mirror of
https://github.com/octoleo/syncthing.git
synced 2025-02-02 03:48:26 +00:00
Merge pull request #1752 from alex2108/master
Distinguish files with same name but different extension in staggered versioner (fixes #1738)
This commit is contained in:
commit
33048f88b8
@ -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…
x
Reference in New Issue
Block a user