aboutsummaryrefslogtreecommitdiffhomepage
path: root/source/filesystem.go
diff options
context:
space:
mode:
authorAsk Bjørn Hansen <[email protected]>2014-02-27 21:26:17 -0800
committerspf13 <[email protected]>2014-02-28 23:23:59 -0500
commite53bc948a5932805be4b0d29f1d809f7d5938cab (patch)
treeb6c229da16c6c89c7a455f904dae87acb752442b /source/filesystem.go
parent0becad727a7bda39c4a7df2553b2f7f0939233d1 (diff)
downloadhugo-e53bc948a5932805be4b0d29f1d809f7d5938cab.tar.gz
hugo-e53bc948a5932805be4b0d29f1d809f7d5938cab.zip
Ignore content files ending in ~
Also add *~ to .gitignore
Diffstat (limited to 'source/filesystem.go')
-rw-r--r--source/filesystem.go11
1 files changed, 10 insertions, 1 deletions
diff --git a/source/filesystem.go b/source/filesystem.go
index cefe4a950..96853c8dd 100644
--- 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
}