diff options
author | Anthony Fok <foka@debian.org> | 2016-02-12 18:54:37 +0800 |
---|---|---|
committer | Anthony Fok <foka@debian.org> | 2016-02-13 00:03:29 +0800 |
commit | 2d11551c53b2feb0a59560a21ba5e74580c7c944 (patch) | |
tree | 431a9122984984548cad6470c78d1926a701f7bd /commands | |
parent | 42f43ad4335eea46193558f878b3f5f3fee82749 (diff) |
Ignore temporary file "4913" created by Vim
Diffstat (limited to 'commands')
-rw-r--r-- | commands/hugo.go | 10 |
1 files changed, 9 insertions, 1 deletions
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 } |