Skip to content

Commit

Permalink
do not worry when absolute_path encounter non-existing file
Browse files Browse the repository at this point in the history
  • Loading branch information
droundy committed Feb 26, 2015
1 parent 559f79f commit 25dbada
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions files.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,10 @@ char *absolute_path(const char *dir, const char *rel) {
error_at_line(1,0, __FILE__, __LINE__, "filename too large!!!");
char *thepath = realpath(filename, 0);
if (!thepath) {
fprintf(stderr, "Difficulty disambiguating %s: %s\n",
filename, strerror(errno));
if (errno != ENOENT) {
fprintf(stderr, "Difficulty disambiguating %s: %s\n",
filename, strerror(errno));
}
thepath = filename;
} else {
free(filename);
Expand Down

0 comments on commit 25dbada

Please sign in to comment.