Make server respond to "fetch" with output formatted for the client's OS family

This commit is contained in:
2024-05-17 19:36:23 -04:00
parent 5ecd7142b3
commit 1230c8a437
2 changed files with 4 additions and 2 deletions
+3 -1
View File
@@ -6,6 +6,7 @@ import (
"github.com/rwinkhart/MUTN/src/cli"
"github.com/rwinkhart/MUTN/src/sync"
"os"
"strconv"
"strings"
)
@@ -18,7 +19,8 @@ func main() {
switch args[1] {
case "fetch":
// print all information needed for syncing to stdout for interpretation by the client
sync.GetRemoteDataFromServer(args[2])
clientIsWindows, _ := strconv.ParseBool(args[3])
sync.GetRemoteDataFromServer(args[2], clientIsWindows)
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
@@ -57,7 +57,7 @@ func EntryReader(decryptedEntry []string, hidePassword bool, sync bool) {
}
}
if sync && !backend.Windows {
if sync && !backend.IsWindows {
SshypSync() // TODO Remove after native sync is implemented
}