From 2d11551c53b2feb0a59560a21ba5e74580c7c944 Mon Sep 17 00:00:00 2001 From: Anthony Fok Date: Fri, 12 Feb 2016 18:54:37 +0800 Subject: [PATCH] Ignore temporary file "4913" created by Vim --- commands/hugo.go | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/commands/hugo.go b/commands/hugo.go index 8a45fbe3c..ce96e21c9 100644 --- a/commands/hugo.go +++ b/commands/hugo.go @@ -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 }