]> git.sesse.net Git - plocate/commitdiff
When stat() in updatedb fails, report the path instead of just the parent directory.
authorSteinar H. Gunderson <steinar+git@gunderson.no>
Sun, 30 Jan 2022 19:10:34 +0000 (20:10 +0100)
committerSteinar H. Gunderson <steinar+git@gunderson.no>
Sun, 30 Jan 2022 19:10:34 +0000 (20:10 +0100)
Reported by Kevin Locke.

updatedb.cpp

index 8d524c6872038b4c72829de3d12cbb354f6fc760..4ead43f66c2493bf98ed5af3fa8c2163b6aa1284 100644 (file)
@@ -713,7 +713,7 @@ int scan(const string &path, int fd, dev_t parent_dev, dir_time modified, dir_ti
 
                struct stat buf;
                if (fstat(e.fd, &buf) != 0) {
-                       perror(path.c_str());
+                       perror((path_plus_slash + e.name).c_str());
                        exit(1);
                }