diff --git a/src/sync/client.go b/src/sync/client.go index dddd0b7..df6f1fc 100644 --- a/src/sync/client.go +++ b/src/sync/client.go @@ -93,10 +93,10 @@ func getRemoteDataFromClient(manualSync bool) ([]string, []int64, []string, []st outputSlice := strings.Split(output, "\x1f") // re-form the lists TODO handle error for index out of bounds (occurs if reading deletions directory on server fails) - entries := strings.Split(outputSlice[0], "\n") - modsStrings := strings.Split(outputSlice[1], "\n") - folders := strings.Split(outputSlice[2], "\n") - deletions := strings.Split(outputSlice[3], "\n") + entries := strings.Split(outputSlice[0], "\n")[1:] + modsStrings := strings.Split(outputSlice[1], "\n")[1:] + folders := strings.Split(outputSlice[2], "\n")[2:] + deletions := strings.Split(outputSlice[3], "\n")[1:] // convert the mod times to int64 var mods []int64 diff --git a/src/sync/server.go b/src/sync/server.go index e9ca779..dc3a387 100644 --- a/src/sync/server.go +++ b/src/sync/server.go @@ -20,18 +20,19 @@ func GetRemoteDataFromServer() { // print the lists to stdout for _, entry := range entryList { - fmt.Println(entry) + fmt.Print("\n" + entry) } - fmt.Println("\x1f") + fmt.Print("\x1f") for _, mod := range modList { - fmt.Println(mod) + fmt.Print("\n") + fmt.Print(mod) } - fmt.Print("\x1f") // do not print new lines as the prior output is []int64 + fmt.Print("\x1f") for _, dir := range dirList { - fmt.Println(dir) + fmt.Print("\n" + dir) } - fmt.Println("\x1f") + fmt.Print("\x1f") for _, deletion := range deletionsList { - fmt.Println(deletion.Name()) + fmt.Print("\n" + deletion.Name()) } }