mirror of
https://github.com/octoleo/syncthing.git
synced 2024-11-09 14:50:56 +00:00
Distinguish files with same name but different extension in staggered versioner (fixes #1738)
This commit is contained in:
parent
d0ebf06ff8
commit
0ec01f4e78
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user