This commit is contained in:
parent
8a4c00d82e
commit
97a8777d03
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue