drive: fix using list recursive on shortcuts to directories

This commit is contained in:
Nick Craig-Wood 2020-05-11 12:32:50 +01:00
parent b91e01fd22
commit 8ddb3fbb2e

View File

@ -1914,8 +1914,9 @@ func (f *Fs) resolveShortcut(item *drive.File) (newItem *drive.File, err error)
if err != nil {
return nil, errors.Wrap(err, "failed to resolve shortcut")
}
// make sure we use the Name from the original item
// make sure we use the Name and Parents from the original item
newItem.Name = item.Name
newItem.Parents = item.Parents
// the new ID is a composite ID
newItem.Id = joinID(newItem.Id, item.Id)
return newItem, nil