commit e53bc948a5932805be4b0d29f1d809f7d5938cab
parent 0becad727a7bda39c4a7df2553b2f7f0939233d1
Author: Ask Bjørn Hansen <ask@develooper.com>
Date: Thu, 27 Feb 2014 21:26:17 -0800
Ignore content files ending in ~
Also add *~ to .gitignore
Diffstat:
2 files changed, 11 insertions(+), 1 deletion(-)
diff --git a/.gitignore b/.gitignore
@@ -4,3 +4,4 @@ hugo.exe
*.swp
*.swo
.DS_Store
+*~
diff --git a/source/filesystem.go b/source/filesystem.go
@@ -117,5 +117,14 @@ func (f *Filesystem) avoid(filePath string) bool {
}
func ignoreDotFile(filePath string) bool {
- return filepath.Base(filePath)[0] == '.'
+ base := filepath.Base(filePath)
+ if base[0] == '.' {
+ return true
+ }
+
+ if base[len(base)-1] == '~' {
+ return true
+ }
+
+ return false
}