]> git.sesse.net Git - plocate/commitdiff
Fix verbose printing when updatedb reads directories from an old database.
authorSteinar H. Gunderson <steinar+git@gunderson.no>
Sat, 28 Nov 2020 20:59:21 +0000 (21:59 +0100)
committerSteinar H. Gunderson <steinar+git@gunderson.no>
Sat, 28 Nov 2020 20:59:21 +0000 (21:59 +0100)
updatedb.cpp

index f655aa33fe6b80468b17b81c59f732594af3a7dc..1be25e2d4b06cae61c7a057f520a9af8020819ad 100644 (file)
@@ -598,6 +598,11 @@ int scan(const string &path, int fd, dev_t parent_dev, dir_time modified, dir_ti
                // by reading from the database. (We still need to open and stat everything,
                // though, but that happens in a later step.)
                entries = move(db_entries);
+               if (conf_verbose) {
+                       for (const entry &e : entries) {
+                               printf("%s/%s\n", path.c_str(), e.name.c_str());
+                       }
+               }
        } else {
                dir = fdopendir(fd);  // Takes over ownership of fd.
                if (dir == nullptr) {