drive: create destination directory on Move()

This commit is contained in:
Nick Craig-Wood 2016-12-09 16:45:11 +00:00
parent d132dc7640
commit c55402caa2

View file

@ -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")
}
// create the destination directory if necessary
err := f.dirCache.FindRoot(true)
if err != nil {
return nil, err
}
// Temporary Object under construction
dstObj, dstInfo, err := f.createFileInfo(remote, srcObj.ModTime(), srcObj.bytes)
if err != nil {