Revert "lib/model: Handle filename conflicts on Windows."

This reverts commit 01e50eb3fa.
This commit is contained in:
Jakob Borg
2016-12-23 11:10:58 +01:00
parent 01e50eb3fa
commit f5a310ad64
6 changed files with 1 additions and 222 deletions

View File

@@ -435,13 +435,6 @@ func (f *sendReceiveFolder) pullerIteration(ignores *ignore.Matcher) int {
continue
}
// Verify that we handle the right thing and not something whose name
// collides.
if !osutil.CheckNameConflict(f.dir, fi.Name) {
f.newError(fi.Name, errNameConflict)
continue
}
switch {
case fi.IsDeleted():
// A deleted file, directory or symlink
@@ -531,13 +524,6 @@ nextFile:
continue
}
// Verify that we handle the right thing and not something whose name
// collides.
if !osutil.CheckNameConflict(f.dir, fi.Name) {
f.newError(fi.Name, errNameConflict)
continue
}
// Check our list of files to be removed for a match, in which case
// we can just do a rename instead.
key := string(fi.Blocks[0].Hash)
@@ -1287,16 +1273,6 @@ func (f *sendReceiveFolder) copierRoutine(in <-chan copyBlocksState, pullChan ch
if err != nil {
return false
}
// The following checks are racy
if !osutil.IsDir(folderRoots[folder], filepath.Dir(file)) {
return false
}
if !osutil.CheckNameConflict(folderRoots[folder], file) {
return false
}
if info, err := osutil.Lstat(inFile); err != nil || !info.Mode().IsRegular() {
return false
}
fd, err := os.Open(inFile)
if err != nil {
return false