aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/db/plugins/simple/Directory.cxx3
-rw-r--r--src/db/plugins/simple/Directory.hxx1
-rw-r--r--src/db/update/Walk.cxx3
3 files changed, 3 insertions, 4 deletions
diff --git a/src/db/plugins/simple/Directory.cxx b/src/db/plugins/simple/Directory.cxx
index 6259df49f..218652b03 100644
--- a/src/db/plugins/simple/Directory.cxx
+++ b/src/db/plugins/simple/Directory.cxx
@@ -39,7 +39,8 @@
Directory::Directory(std::string &&_path_utf8, Directory *_parent)
:parent(_parent),
- mtime(0), have_stat(false),
+ mtime(0),
+ inode(0), device(0),
path(std::move(_path_utf8)),
mounted_database(nullptr)
{
diff --git a/src/db/plugins/simple/Directory.hxx b/src/db/plugins/simple/Directory.hxx
index 80675bd21..acef62143 100644
--- a/src/db/plugins/simple/Directory.hxx
+++ b/src/db/plugins/simple/Directory.hxx
@@ -95,7 +95,6 @@ struct Directory {
Directory *parent;
time_t mtime;
unsigned inode, device;
- bool have_stat; /* not needed if ino_t == dev_t == 0 is impossible */
std::string path;
diff --git a/src/db/update/Walk.cxx b/src/db/update/Walk.cxx
index afb67ab29..f71faa86d 100644
--- a/src/db/update/Walk.cxx
+++ b/src/db/update/Walk.cxx
@@ -71,7 +71,6 @@ directory_set_stat(Directory &dir, const FileInfo &info)
{
dir.inode = info.inode;
dir.device = info.device;
- dir.have_stat = true;
}
inline void
@@ -167,7 +166,7 @@ FindAncestorLoop(Storage &storage, Directory *parent,
return 0;
while (parent) {
- if (!parent->have_stat &&
+ if (parent->device == 0 && parent->inode == 0 &&
!update_directory_stat(storage, *parent))
return -1;