drive: create destination directory on Move()
This commit is contained in:
parent
d132dc7640
commit
c55402caa2
1 changed files with 6 additions and 0 deletions
|
@ -735,6 +735,12 @@ func (f *Fs) Move(src fs.Object, remote string) (fs.Object, error) {
|
||||||
return nil, errors.New("can't move a Google document")
|
return nil, errors.New("can't move a Google document")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// create the destination directory if necessary
|
||||||
|
err := f.dirCache.FindRoot(true)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
// Temporary Object under construction
|
// Temporary Object under construction
|
||||||
dstObj, dstInfo, err := f.createFileInfo(remote, srcObj.ModTime(), srcObj.bytes)
|
dstObj, dstInfo, err := f.createFileInfo(remote, srcObj.ModTime(), srcObj.bytes)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
Loading…
Reference in a new issue