Archived
1
0
This commit is contained in:
Arnaud Ysmal 2014-03-12 19:22:05 +01:00
parent 47f279a224
commit 2e03dbd4e0

View File

@ -741,9 +741,9 @@ func (db *Dropbox) Copy(src, dst string, isRef bool) (*Entry, error) {
var rv Entry var rv Entry
params := &url.Values{"root": {db.RootDirectory}, "to_path": {dst}} params := &url.Values{"root": {db.RootDirectory}, "to_path": {dst}}
if isRef { if isRef {
params.Set("from_path", src)
} else {
params.Set("from_copy_ref", src) params.Set("from_copy_ref", src)
} else {
params.Set("from_path", src)
} }
err := db.doRequest("POST", "fileops/copy", params, &rv) err := db.doRequest("POST", "fileops/copy", params, &rv)
return &rv, err return &rv, err