mirror of
https://github.com/rwinkhart/MUTN.git
synced 2026-08-28 04:46:41 -04:00
Lay groundwork for NT/UNIX-like sync interoperability
This commit is contained in:
+1
-3
@@ -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")
|
||||
|
||||
@@ -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
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user