Skip to content

Commit

Permalink
Adds permission denied error message.
Browse files Browse the repository at this point in the history
  • Loading branch information
markberger committed Aug 8, 2013
1 parent 1eda277 commit 00f029b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions parser.c
Original file line number Diff line number Diff line change
Expand Up @@ -813,6 +813,10 @@ parse_log (GLog ** logger, char *tail, int n)
}

if (!(*logger)->piping && (fp = fopen (conf.ifile, "r")) == NULL)
if (errno == EACCES) {
error_handler (__PRETTY_FUNCTION__, __FILE__, __LINE__,
"Error while opening the log file. Permission denied.");
}
error_handler (__PRETTY_FUNCTION__, __FILE__, __LINE__,
"Error while opening the log file. Make sure it exists.");

Expand Down

0 comments on commit 00f029b

Please sign in to comment.