forked from TrueCloudLab/rclone
onedrive: make sure we create root for server side copy
This commit is contained in:
parent
6474f2c7c2
commit
986a2851bf
1 changed files with 6 additions and 0 deletions
|
@ -615,6 +615,12 @@ func (f *Fs) Copy(src fs.Object, remote string) (fs.Object, error) {
|
||||||
return nil, errors.Errorf("can't copy %q -> %q as are same name when lowercase", srcPath, dstPath)
|
return nil, errors.Errorf("can't copy %q -> %q as are same name when lowercase", srcPath, dstPath)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// create the destination directory if necessary
|
||||||
|
err = f.dirCache.FindRoot(true)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
// Create temporary object
|
// Create temporary object
|
||||||
dstObj, leaf, directoryID, err := f.createObject(remote, srcObj.modTime, srcObj.size)
|
dstObj, leaf, directoryID, err := f.createObject(remote, srcObj.modTime, srcObj.size)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
Loading…
Reference in a new issue