mirror of
https://github.com/rclone/rclone.git
synced 2024-11-23 02:34:40 +08:00
dropbox: Fix mkdir on already created directory
This commit is contained in:
parent
e57a4c7c0c
commit
b185e104ed
|
@ -343,7 +343,14 @@ func (f *FsDropbox) Put(in io.Reader, remote string, modTime time.Time, size int
|
|||
|
||||
// Mkdir creates the container if it doesn't exist
|
||||
func (f *FsDropbox) Mkdir() error {
|
||||
_, err := f.db.CreateFolder(f.slashRoot)
|
||||
entry, err := f.db.Metadata(f.slashRoot, false, false, "", "", metadataLimit)
|
||||
if err == nil {
|
||||
if entry.IsDir {
|
||||
return nil
|
||||
}
|
||||
return fmt.Errorf("%q already exists as file", f.root)
|
||||
}
|
||||
_, err = f.db.CreateFolder(f.slashRoot)
|
||||
return err
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user