Merge pull request #1358 from uhoreg/ignore-emacs-tmp
ignore emacs temporary files
This commit is contained in:
commit
bc3e45d642
1 changed files with 5 additions and 2 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue