mirror of
https://github.com/octoleo/syncthing.git
synced 2024-11-09 23:00:58 +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 {
|
} else {
|
||||||
// Regular file, or possibly a symlink.
|
// Regular file, or possibly a symlink.
|
||||||
|
ext := filepath.Ext(path)
|
||||||
extension := filenameTag(path)
|
versionTag := filenameTag(path)
|
||||||
dir := filepath.Dir(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]++
|
filesPerDir[dir]++
|
||||||
versionsPerFile[name] = append(versionsPerFile[name], path)
|
versionsPerFile[name] = append(versionsPerFile[name], path)
|
||||||
|
Loading…
Reference in New Issue
Block a user