]> Sergey Matveev's repositories - glocate.git/commitdiff
zfs-diff appends / to dataset roots
authorSergey Matveev <stargrave@stargrave.org>
Tue, 30 Aug 2022 11:11:21 +0000 (14:11 +0300)
committerSergey Matveev <stargrave@stargrave.org>
Tue, 30 Aug 2022 11:55:43 +0000 (14:55 +0300)
diff.go

diff --git a/diff.go b/diff.go
index 31712d63aaff055dea895b639dbc85323a6ab1e46d393ae7a232f2a4b80d9f1d..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))
                }
                isDir = cols[1] == "/"
                name := deoctalize(strings.TrimPrefix(cols[2], strip))
+               name = strings.TrimRight(name, "/")
                if name == "" {
                        continue
                }
                if name == "" {
                        continue
                }