diff --git a/main.go b/main.go index 2209cae..02237a2 100644 --- a/main.go +++ b/main.go @@ -24,7 +24,7 @@ func main() { fmt.Fprintf(os.Stderr, "cannot calculate home dir: %v", err) os.Exit(1) } - docs := fmt.Sprintf("%s/Documents/", u.HomeDir) + docs := fmt.Sprintf("%s/Documents", u.HomeDir) saves := fmt.Sprintf("%s/Documents/saves", u.HomeDir) appSupport := fmt.Sprintf("%s/Library/Application Support", u.HomeDir) if len(os.Args) != 2 { @@ -35,9 +35,9 @@ func main() { var cmd *exec.Cmd switch os.Args[1] { case "pull": - cmd = exec.Command("rsync", "-auv", "sj.mcquay.me:~/docs/saves", docs) + cmd = exec.Command("rsync", "-auv", "sj.mcquay.me:~/docs/saves", fmt.Sprintf("%s/", docs)) case "push": - cmd = exec.Command("rsync", "-auv", fmt.Sprintf("%ssaves", docs), "sj.mcquay.me:~/docs/") + cmd = exec.Command("rsync", "-auv", fmt.Sprintf("%s/saves", docs), "sj.mcquay.me:~/docs/") case "link": dirs, err := ioutil.ReadDir(saves) if err != nil {