mirror of
https://github.com/rwinkhart/MUTN.git
synced 2026-09-03 23:57:23 -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/cli"
|
||||||
"github.com/rwinkhart/MUTN/src/sync"
|
"github.com/rwinkhart/MUTN/src/sync"
|
||||||
"os"
|
"os"
|
||||||
"strconv"
|
|
||||||
"strings"
|
"strings"
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -19,8 +18,7 @@ func main() {
|
|||||||
switch args[1] {
|
switch args[1] {
|
||||||
case "fetch":
|
case "fetch":
|
||||||
// print all information needed for syncing to stdout for interpretation by the client
|
// print all information needed for syncing to stdout for interpretation by the client
|
||||||
clientIsWindows, _ := strconv.ParseBool(args[3])
|
sync.GetRemoteDataFromServer(args[2])
|
||||||
sync.GetRemoteDataFromServer(args[2], clientIsWindows)
|
|
||||||
case "shear":
|
case "shear":
|
||||||
// shear an entry from the server and add it to the deletions directory
|
// shear an entry from the server and add it to the deletions directory
|
||||||
deviceIDTargetLocation := strings.Split(args[2], "\x1d")
|
deviceIDTargetLocation := strings.Split(args[2], "\x1d")
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ func main() {
|
|||||||
if strings.HasPrefix(args[1], "/") {
|
if strings.HasPrefix(args[1], "/") {
|
||||||
|
|
||||||
// store location of target entry
|
// 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)
|
// entry reader shortcut (if no other arguments are supplied)
|
||||||
if argsCount == 2 {
|
if argsCount == 2 {
|
||||||
|
|||||||
+1
-1
@@ -16,7 +16,7 @@ func RenameCli(oldLocation string) {
|
|||||||
backend.TargetIsFile(oldLocation, true, 0)
|
backend.TargetIsFile(oldLocation, true, 0)
|
||||||
|
|
||||||
// prompt user for new location and rename
|
// 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)
|
backend.Rename(oldLocation, newLocation)
|
||||||
|
|
||||||
// exit is done from backend.Rename
|
// exit is done from backend.Rename
|
||||||
|
|||||||
Reference in New Issue
Block a user