From 1fb283484469192fc7c954f14d6f2be5234d7c6b Mon Sep 17 00:00:00 2001 From: Randall Winkhart Date: Fri, 18 Oct 2024 12:34:17 -0400 Subject: [PATCH] Fix renaming an entry/folder to an invalid path still attempting the rename on the server --- sync/common.go | 1 + 1 file changed, 1 insertion(+) diff --git a/sync/common.go b/sync/common.go index dad09b7..a5df1f1 100644 --- a/sync/common.go +++ b/sync/common.go @@ -88,6 +88,7 @@ func RenameLocal(oldLocationIncomplete, newLocationIncomplete string, verifyOldL err := os.Rename(oldLocation, newLocation) if err != nil { 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