Annotate temp files that Hugo ignores

This commit is contained in:
Steve Francia 2016-06-02 15:25:19 -04:00 committed by Bjørn Erik Pedersen
parent ce05dfa553
commit f8e4a0608c

View file

@ -742,15 +742,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") ||
(ext == ".DS_Store") ||
filepath.Base(ev.Name) == "4913" ||
strings.HasPrefix(ext, ".goutputstream") ||
strings.HasSuffix(ext, "jb_old___") ||
strings.HasSuffix(ext, "jb_bak___") ||
strings.HasPrefix(ext, ".sb-")
(ext == ".swp") || // vim
(ext == ".swx") || // vim
(ext == ".tmp") || // generic temp file
(ext == ".DS_Store") || // OSX Thumbnail
filepath.Base(ev.Name) == "4913" || // vim
strings.HasPrefix(ext, ".goutputstream") || // gnome
strings.HasSuffix(ext, "jb_old___") || // intelliJ
strings.HasSuffix(ext, "jb_bak___") || // intelliJ
strings.HasPrefix(ext, ".sb-") // byword
if istemp {
continue
}