forked from TrueCloudLab/rclone
drive: look for dirs as well as files on NewObject
This means that we can return ErrorNotAFile when there is an object with the same name as a directory rather than potentially creating a duplicate name.
This commit is contained in:
parent
e103c4c26a
commit
bc0f487369
1 changed files with 1 additions and 1 deletions
|
@ -2927,7 +2927,7 @@ func (f *Fs) getRemoteInfoWithExport(ctx context.Context, remote string) (
|
||||||
}
|
}
|
||||||
directoryID = actualID(directoryID)
|
directoryID = actualID(directoryID)
|
||||||
|
|
||||||
found, err := f.list(ctx, []string{directoryID}, leaf, false, true, false, func(item *drive.File) bool {
|
found, err := f.list(ctx, []string{directoryID}, leaf, false, false, false, func(item *drive.File) bool {
|
||||||
if !f.opt.SkipGdocs {
|
if !f.opt.SkipGdocs {
|
||||||
extension, exportName, exportMimeType, isDocument = f.findExportFormat(item)
|
extension, exportName, exportMimeType, isDocument = f.findExportFormat(item)
|
||||||
if exportName == leaf {
|
if exportName == leaf {
|
||||||
|
|
Loading…
Reference in a new issue