diff options
Diffstat (limited to '')
-rw-r--r--source/scan-tree.c5
1 file changed, 3 insertions, 2 deletions
diff --git a/source/scan-tree.c b/source/scan-tree.c
index b941ec5..7e7f28b 100644
--- a/source/scan-tree.c
+++ b/source/scan-tree.c
@@ -32,7 +32,7 @@ static int stat_entry(const char *dir, const char *name, struct stat *st)
// A missing entry is the ordinary answer for a directory that is not a
// repository, so only some other failure is worth reporting.
if (err && errno != ENOENT)
- fprintf(stderr, "[cgit] Unable to stat %s: %s (%d)\n", dir, strerror(errno), errno);
+ fprintf(stderr, "[cgit] Unable to stat %s: %s (%d)\n", path.buf, strerror(errno), errno);
strbuf_release(&path);
return err;
}
@@ -363,7 +363,8 @@ void scan_projects(const char *path, const char *projectsfile)
strbuf_insert(&line, 0, path, strlen(path));
scan_path(path, line.buf);
}
- if ((err = ferror(projects))) {
+ if (ferror(projects)) {
+ err = errno;
fprintf(stderr, "[cgit] Unable to read project list %s: %s (%d)\n",
projectsfile, strerror(err), err);
}