onedrive, drive, amazonclouddrive: make sure we find the root
This fixes copyto copying things to the wrong place - fixes #1231
This commit is contained in:
parent
986a2851bf
commit
9b07d32c02
5 changed files with 16 additions and 29 deletions
|
@ -553,7 +553,7 @@ func (f *Fs) Put(in io.Reader, src fs.ObjectInfo) (fs.Object, error) {
|
|||
return nil, err
|
||||
}
|
||||
// If not create it
|
||||
leaf, directoryID, err := f.dirCache.FindPath(remote, true)
|
||||
leaf, directoryID, err := f.dirCache.FindRootAndPath(remote, true)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
@ -925,7 +925,7 @@ func (o *Object) readMetaData() (err error) {
|
|||
if o.info != nil {
|
||||
return nil
|
||||
}
|
||||
leaf, directoryID, err := o.fs.dirCache.FindPath(o.remote, false)
|
||||
leaf, directoryID, err := o.fs.dirCache.FindRootAndPath(o.remote, false)
|
||||
if err != nil {
|
||||
if err == fs.ErrorDirNotFound {
|
||||
return fs.ErrorObjectNotFound
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue