aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPetter Rasmussen2015-07-18 16:29:40 +0200
committerPetter Rasmussen2015-07-18 16:29:40 +0200
commit72cfaf15c13bab07338df8e90af6cdb3dccc005e (patch)
treebc33e2be453497d1ca826e04003ea5f1b1359b4f
parent997a2ea83a6f04177b1264775bb5b0c460fe0be8 (diff)
downloadgdrive-72cfaf15c13bab07338df8e90af6cdb3dccc005e.tar.bz2
Use os.Chdir (#56)
Apparently file.Chdir is not supported on windows
-rw-r--r--cli/cli.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/cli/cli.go b/cli/cli.go
index eae51e5..b662841 100644
--- a/cli/cli.go
+++ b/cli/cli.go
@@ -281,7 +281,8 @@ func uploadDirectory(d *gdrive.Drive, input *os.File, inputInfo os.FileInfo, tit
}
// Go into directory
- err = input.Chdir()
+ dstDir := filepath.Join(currentDir, inputInfo.Name())
+ err = os.Chdir(dstDir)
if err != nil {
return err
}