diff options
author | Ask Bjørn Hansen <[email protected]> | 2014-02-27 21:26:17 -0800 |
---|---|---|
committer | spf13 <[email protected]> | 2014-02-28 23:23:59 -0500 |
commit | e53bc948a5932805be4b0d29f1d809f7d5938cab (patch) | |
tree | b6c229da16c6c89c7a455f904dae87acb752442b /source/filesystem.go | |
parent | 0becad727a7bda39c4a7df2553b2f7f0939233d1 (diff) | |
download | hugo-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.go | 11 |
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 } |