Ignore temporary file "4913" created by Vim

This commit is contained in:
Anthony Fok 2016-02-12 18:54:37 +08:00
parent 42f43ad433
commit 2d11551c53

View file

@ -711,7 +711,15 @@ func NewWatcher(port int) error {
for _, ev := range evs {
ext := filepath.Ext(ev.Name)
istemp := strings.HasSuffix(ext, "~") || (ext == ".swp") || (ext == ".swx") || (ext == ".tmp") || strings.HasPrefix(ext, ".goutputstream") || strings.HasSuffix(ext, "jb_old___") || strings.HasSuffix(ext, "jb_bak___") || (ext == ".DS_Store")
istemp := strings.HasSuffix(ext, "~") ||
(ext == ".swp") ||
(ext == ".swx") ||
(ext == ".tmp") ||
(ext == ".DS_Store") ||
filepath.Base(ev.Name) == "4913" ||
strings.HasPrefix(ext, ".goutputstream") ||
strings.HasSuffix(ext, "jb_old___") ||
strings.HasSuffix(ext, "jb_bak___")
if istemp {
continue
}