]> Sergey Matveev's repositories - glocate.git/blobdiff - diff.go
Nullify directory sizes before DirSizer
[glocate.git] / diff.go
diff --git a/diff.go b/diff.go
index be79911b777e14b1857fe35a74639400adbbdb1a91a80884fcf0640ce71a5d78..181f5c3ee94b6acbe65d9b29786325b881e0d221b7af78d7481638beacbcf832 100644 (file)
--- a/diff.go
+++ b/diff.go
@@ -223,6 +223,9 @@ func updateWithDiff(dbPath, strip string) *os.File {
                        ent.size = mods[0].size
                        mods = mods[1:]
                }
+               if ent.IsDir() {
+                       ent.size = 0
+               }
                entsDirSizer <- ent
        }
        for len(adds) > 0 {