mirror of
https://github.com/syncthing/syncthing.git
synced 2026-10-24 03:58:23 -04:00
This commit is contained in:
1 parent
8a4c00d82e
commit
97a8777d03
1 file changed
+7
@@ -224,6 +224,13 @@ func (f *caseFilesystem) Rename(oldpath, newpath string) error {
|
||||
if err := f.checkCase(oldpath); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := f.checkCase(newpath); err != nil {
|
||||
// Case-only rename is ok
|
||||
e := &ErrCaseConflict{}
|
||||
if !errors.As(err, &e) || e.Real != oldpath {
|
||||
return err
|
||||
}
|
||||
}
|
||||
if err := f.Filesystem.Rename(oldpath, newpath); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user