]> Sergey Matveev's repositories - glocate.git/blobdiff - diff.go
zfs-diff appends / to dataset roots
[glocate.git] / diff.go
diff --git a/diff.go b/diff.go
index dda4fd9ded52ee8109d30cbf1974527600de590be43819023d0df4ab8fbb91f4..be79911b777e14b1857fe35a74639400adbbdb1a91a80884fcf0640ce71a5d78 100644 (file)
--- a/diff.go
+++ b/diff.go
@@ -61,6 +61,7 @@ func updateWithDiff(dbPath, strip string) *os.File {
                }
                isDir = cols[1] == "/"
                name := deoctalize(strings.TrimPrefix(cols[2], strip))
+               name = strings.TrimRight(name, "/")
                if name == "" {
                        continue
                }
@@ -175,7 +176,7 @@ func updateWithDiff(dbPath, strip string) *os.File {
        if err != nil {
                log.Fatalln(err)
        }
-       tmp0, err := os.CreateTemp("", "glocate-idx")
+       tmp0, err := os.CreateTemp(TmpDir, "glocate-idx")
        if err != nil {
                log.Fatalln(err)
        }