Ignore hidden files per Unix conventions
This commit is contained in:
parent
18a83347b5
commit
f794f30b7d
|
@ -187,7 +187,7 @@ func dirFiles(dir string) ([]string, []string, error) {
|
||||||
// provided file name is a temporary file for the following editors:
|
// provided file name is a temporary file for the following editors:
|
||||||
// emacs or vim.
|
// emacs or vim.
|
||||||
func isTemporaryFile(name string) bool {
|
func isTemporaryFile(name string) bool {
|
||||||
return strings.HasSuffix(name, "~") || // vim
|
return strings.HasPrefix(name, ".") || // Unix-like hidden files
|
||||||
strings.HasPrefix(name, ".#") || // emacs
|
strings.HasSuffix(name, "~") || // vim
|
||||||
(strings.HasPrefix(name, "#") && strings.HasSuffix(name, "#")) // emacs
|
(strings.HasPrefix(name, "#") && strings.HasSuffix(name, "#")) // emacs
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue