diff options
Diffstat (limited to 'source/filesystem.go')
-rw-r--r-- | source/filesystem.go | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/source/filesystem.go b/source/filesystem.go index cefe4a950..96853c8dd 100644 --- a/source/filesystem.go +++ b/source/filesystem.go @@ -117,5 +117,14 @@ func (f *Filesystem) avoid(filePath string) bool { } func ignoreDotFile(filePath string) bool { - return filepath.Base(filePath)[0] == '.' + base := filepath.Base(filePath) + if base[0] == '.' { + return true + } + + if base[len(base)-1] == '~' { + return true + } + + return false } |