mirror of
https://github.com/rwinkhart/libmutton.git
synced 2026-09-03 07:37:28 -04:00
Fix renaming an entry/folder to an invalid path still attempting the rename on the server
This commit is contained in:
@@ -88,6 +88,7 @@ func RenameLocal(oldLocationIncomplete, newLocationIncomplete string, verifyOldL
|
|||||||
err := os.Rename(oldLocation, newLocation)
|
err := os.Rename(oldLocation, newLocation)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Println(core.AnsiError + "Failed to rename - Does the target containing directory exist?" + core.AnsiReset)
|
fmt.Println(core.AnsiError + "Failed to rename - Does the target containing directory exist?" + core.AnsiReset)
|
||||||
|
os.Exit(core.ErrorTargetNotFound)
|
||||||
}
|
}
|
||||||
|
|
||||||
// do not exit program, as this function is used as part of RenameRemoteFromClient
|
// do not exit program, as this function is used as part of RenameRemoteFromClient
|
||||||
|
|||||||
Reference in New Issue
Block a user