Distinguish files with same name but different extension in staggered versioner (fixes #1738)

This commit is contained in:
Alexander Graf 2015-05-03 10:36:46 +02:00
parent d0ebf06ff8
commit 0ec01f4e78

View File

@ -116,10 +116,11 @@ func (v Staggered) clean() {
}
} else {
// Regular file, or possibly a symlink.
extension := filenameTag(path)
ext := filepath.Ext(path)
versionTag := filenameTag(path)
dir := filepath.Dir(path)
name := path[:len(path)-len(extension)-1]
withoutExt := path[:len(path)-len(ext)-len(versionTag)-1]
name := withoutExt + ext
filesPerDir[dir]++
versionsPerFile[name] = append(versionsPerFile[name], path)