dircache: allow empty string as rootparentid #FIXME

This commit is contained in:
dougal
2025-12-08 17:12:25 +00:00
parent aac0828491
commit 9b83d735a8

View File

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