1
0
mirror of https://github.com/rclone/rclone.git synced 2026-01-03 17:13:18 +00:00

build: fix gocritic lint issue elseif

This commit is contained in:
albertony
2024-05-31 15:18:56 +02:00
committed by Nick Craig-Wood
parent 4454ed9d3b
commit e82b5b11af
13 changed files with 92 additions and 120 deletions

View File

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