mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-11-30 10:52:50 +00:00
Look in getlocalbase() for the calendar-data package data
Fix d20d655018
where getlocalbase()
wasn't used to fill out the printf(3) format of _PATH_INCLUDE_LOCAL.
Differential Revision: https://reviews.freebsd.org/D38975
Reviewed by: imp
This commit is contained in:
parent
84eac07049
commit
65e9eb0701
@ -151,9 +151,12 @@ cal_fopen(const char *file)
|
||||
}
|
||||
|
||||
warnx("can't open calendar file \"%s\"", file);
|
||||
if (!warned && stat(_PATH_INCLUDE_LOCAL, &sb) != 0) {
|
||||
warnx("calendar data files now provided by calendar-data pkg.");
|
||||
warned = true;
|
||||
if (!warned) {
|
||||
snprintf(path, sizeof(path), _PATH_INCLUDE_LOCAL, getlocalbase());
|
||||
if (stat(path, &sb) != 0) {
|
||||
warnx("calendar data files now provided by calendar-data pkg.");
|
||||
warned = true;
|
||||
}
|
||||
}
|
||||
|
||||
return (NULL);
|
||||
|
Loading…
Reference in New Issue
Block a user