Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/gohugoio/hugo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAsk Bjørn Hansen <ask@develooper.com>2014-02-28 09:26:17 +0400
committerspf13 <steve.francia@gmail.com>2014-03-01 08:23:59 +0400
commite53bc948a5932805be4b0d29f1d809f7d5938cab (patch)
treeb6c229da16c6c89c7a455f904dae87acb752442b /source/filesystem.go
parent0becad727a7bda39c4a7df2553b2f7f0939233d1 (diff)
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
}