mirror of
https://github.com/rwinkhart/libmutton.git
synced 2026-08-28 04:46:42 -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
|
package sync
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"fmt"
|
||||||
"os"
|
"os"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
@@ -100,7 +101,7 @@ func AddFolderLocal(targetLocationIncomplete string) {
|
|||||||
err := os.Mkdir(targetLocationComplete, 0700)
|
err := os.Mkdir(targetLocationComplete, 0700)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
if os.IsExist(err) {
|
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 {
|
} else {
|
||||||
core.PrintError("Failed to create directory: "+err.Error(), core.ErrorWrite, true)
|
core.PrintError("Failed to create directory: "+err.Error(), core.ErrorWrite, true)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user