Merge pull request #1358 from uhoreg/ignore-emacs-tmp

ignore emacs temporary files
erikj/soft_logout
Travis Ralston 6 years ago committed by GitHub
commit bc3e45d642
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -123,8 +123,11 @@ func filter(e fsnotify.Event) bool {
return false
}
// Avoid some temp files that vim writes
if strings.HasSuffix(e.Name, "~") || strings.HasSuffix(e.Name, ".swp") || strings.HasPrefix(e.Name, ".") {
_, fname := filepath.Split(e.Name)
// Avoid some temp files that vim or emacs writes
if strings.HasSuffix(e.Name, "~") || strings.HasSuffix(e.Name, ".swp") || strings.HasPrefix(fname, ".") ||
(strings.HasPrefix(fname, "#") && strings.HasSuffix(fname, "#")) {
return false
}

Loading…
Cancel
Save