mirror of
https://github.com/matrix-org/matrix-spec
synced 2025-12-30 20:48:37 +01:00
ignore emacs temporary files
and fix ignoring of dotfiles
This commit is contained in:
parent
c1b630e975
commit
a2e0d0382c
|
|
@ -120,8 +120,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…
Reference in a new issue