mirror of
https://github.com/rwinkhart/libmutton.git
synced 2026-08-27 20:36:29 -04:00
Fix inability to add a folder on the server if the folder was already created on a client that failed to sync
This commit is contained in:
+2
-1
@@ -1,6 +1,7 @@
|
||||
package sync
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
"strings"
|
||||
|
||||
@@ -100,7 +101,7 @@ func AddFolderLocal(targetLocationIncomplete string) {
|
||||
err := os.Mkdir(targetLocationComplete, 0700)
|
||||
if err != nil {
|
||||
if os.IsExist(err) {
|
||||
core.PrintError("Directory already exists", core.ErrorTargetExists, true)
|
||||
fmt.Println(ansiUpload + "Directory already exists - libmutton will still ensure it exists on the server")
|
||||
} else {
|
||||
core.PrintError("Failed to create directory: "+err.Error(), core.ErrorWrite, true)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user