If we can't open a calendar file, don't guess why. Check the error

return and print a useful message.

Prior to this commit, access problems could give rise to messages that
the file didn't exist.
This commit is contained in:
Greg Lehey 2007-12-30 22:02:50 +00:00
parent a0db222644
commit cd59b2cd17
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=175002

View File

@ -349,7 +349,8 @@ opencal(void)
break;
}
if (!found)
errx(1, "no calendar file: ``%s''", calendarFile);
errx(1, "can't open calendar file \"%s\": %s (%d)",
calendarFile, strerror (errno), errno);
}
}
if (pipe(pdes) < 0)