Ignore #snapshot folders when scanning. Fixes #3257

This commit is contained in:
Deluan 2024-09-13 17:30:08 -04:00
parent a1866c7ff3
commit 9ae2ec1a07
3 changed files with 13 additions and 40 deletions

View file

@ -82,9 +82,13 @@ var _ = Describe("walk_dir_tree", func() {
dirEntry := getDirEntry(baseDir, "...unhidden_folder")
Expect(isDirIgnored(baseDir, dirEntry)).To(BeFalse())
})
It("returns false when folder name is $Recycle.Bin", func() {
It("returns true when folder name is $Recycle.Bin", func() {
dirEntry := getDirEntry(baseDir, "$Recycle.Bin")
Expect(isDirIgnored(baseDir, dirEntry)).To(BeFalse())
Expect(isDirIgnored(baseDir, dirEntry)).To(BeTrue())
})
It("returns true when folder name is #snapshot", func() {
dirEntry := getDirEntry(baseDir, "#snapshot")
Expect(isDirIgnored(baseDir, dirEntry)).To(BeTrue())
})
})