1
0
mirror of https://github.com/rclone/rclone.git synced 2025-12-21 18:53:34 +00:00

dircache: allow empty string as root parent id

This was causing an internal error with the drime backend which has the
root parent id as an empty string. This shouldn't affect anything else.
This commit is contained in:
dougal
2025-12-08 17:12:25 +00:00
parent e5e6a4b5ae
commit 42373c1cff

View File

@@ -361,9 +361,6 @@ func (dc *DirCache) RootParentID(ctx context.Context, create bool) (ID string, e
} else if dc.rootID == dc.trueRootID { } else if dc.rootID == dc.trueRootID {
return "", errors.New("is root directory") return "", errors.New("is root directory")
} }
if dc.rootParentID == "" {
return "", errors.New("internal error: didn't find rootParentID")
}
return dc.rootParentID, nil return dc.rootParentID, nil
} }