Add ".swx" suffix to file watcher's ignore list - hugo - [fork] hugo port for 9front
 (HTM) git clone git@git.drkhsh.at/hugo.git
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) Submodules
 (DIR) README
 (DIR) LICENSE
       ---
 (DIR) commit 208086ebff1579600459fdf8653c787e568fb1a7
 (DIR) parent f0b3979a9fa0bb27d069fc3b4890850afd752238
 (HTM) Author: Anthony Fok <foka@debian.org>
       Date:   Wed, 14 Jan 2015 04:46:31 -0700
       
       Add ".swx" suffix to file watcher's ignore list
       
       When a user uses Vim to open a file, it briefly creates a
       ".filename.md.swx" file which needlessly triggers a website rebuild.
       
       According to a comment in Vim's src/memline.c:
       
           /*
            * on MS-DOS compatible filesystems (e.g. messydos) file.doc.swp
            * and file.doc are the same file. To guess if this problem is
            * present try if file.doc.swx exists. If it does, we set
            * buf->b_shortname and try file_doc.swp (dots replaced by
            * underscores for this file), and try again. If it doesn't we
            * assume that "file.doc.swp" already exists.
            */
       
       Diffstat:
         M commands/hugo.go                    |       2 +-
       
       1 file changed, 1 insertion(+), 1 deletion(-)
       ---
 (DIR) diff --git a/commands/hugo.go b/commands/hugo.go
       @@ -347,7 +347,7 @@ func NewWatcher(port int) error {
        
                                        for _, ev := range evs {
                                                ext := filepath.Ext(ev.Name)
       -                                        istemp := strings.HasSuffix(ext, "~") || (ext == ".swp") || (ext == ".tmp") || (strings.HasPrefix(ext, ".goutputstream"))
       +                                        istemp := strings.HasSuffix(ext, "~") || (ext == ".swp") || (ext == ".swx") || (ext == ".tmp") || (strings.HasPrefix(ext, ".goutputstream"))
                                                if istemp {
                                                        continue
                                                }