Lay groundwork for NT/UNIX-like sync interoperability

This commit is contained in:
2024-05-30 22:12:29 -04:00
parent 7ff5e5abfd
commit b0d6c6121b
3 changed files with 3 additions and 5 deletions
+1 -3
View File
@@ -6,7 +6,6 @@ import (
"github.com/rwinkhart/MUTN/src/cli"
"github.com/rwinkhart/MUTN/src/sync"
"os"
"strconv"
"strings"
)
@@ -19,8 +18,7 @@ func main() {
switch args[1] {
case "fetch":
// print all information needed for syncing to stdout for interpretation by the client
clientIsWindows, _ := strconv.ParseBool(args[3])
sync.GetRemoteDataFromServer(args[2], clientIsWindows)
sync.GetRemoteDataFromServer(args[2])
case "shear":
// shear an entry from the server and add it to the deletions directory
deviceIDTargetLocation := strings.Split(args[2], "\x1d")
+1 -1
View File
@@ -24,7 +24,7 @@ func main() {
if strings.HasPrefix(args[1], "/") {
// store location of target entry
targetLocation := backend.TargetLocationFormat(args[1][1:])
targetLocation := backend.TargetLocationFormat(args[1])
// entry reader shortcut (if no other arguments are supplied)
if argsCount == 2 {
+1 -1
View File
@@ -16,7 +16,7 @@ func RenameCli(oldLocation string) {
backend.TargetIsFile(oldLocation, true, 0)
// prompt user for new location and rename
newLocation := backend.EntryRoot + backend.PathSeparator + input("New location:")
newLocation := backend.TargetLocationFormat(input("New location:"))
backend.Rename(oldLocation, newLocation)
// exit is done from backend.Rename