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:
grog 2007-12-30 22:02:50 +00:00
parent fac9c01c23
commit 0abc02edc2

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)