We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3b784b5 commit b3951c1Copy full SHA for b3951c1
lock.go
@@ -37,6 +37,9 @@ func (f *FileOperation) CanMove(from, to string) error {
37
if !doesFileExist(from) {
38
return errors.New("the source file does not exist")
39
}
40
+ if doesFileExist(to) {
41
+ return errors.New("file already exists with this name at the destination")
42
+ }
43
if !isValidFolderPath(from) {
44
return errors.New("the source is not a valid file path")
45
0 commit comments