{"record":{"id":"cd877d7022dc32a1","repo":"AlistGo/alist","slug":"cannot-rename-root-folder","errorCode":null,"errorMessage":"cannot rename root folder","messagePattern":"cannot rename root folder","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"drivers/proton_drive/util.go","lineNumber":589,"sourceCode":"\t//fmt.Printf(\"DEBUG DirectRename: path=%s, newName=%s\", srcObj.GetPath(), newName)\n\n\tif d.MainShare == nil || d.DefaultAddrKR == nil {\n\t\treturn nil, fmt.Errorf(\"missing required fields: MainShare=%v, DefaultAddrKR=%v\",\n\t\t\td.MainShare != nil, d.DefaultAddrKR != nil)\n\t}\n\n\tif d.protonDrive == nil {\n\t\treturn nil, fmt.Errorf(\"protonDrive bridge is nil\")\n\t}\n\n\tsrcLink, err := d.searchByPath(ctx, srcObj.GetPath(), srcObj.IsDir())\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"failed to find source: %w\", err)\n\t}\n\n\tparentLinkID := srcLink.ParentLinkID\n\tif parentLinkID == \"\" {\n\t\treturn nil, fmt.Errorf(\"cannot rename root folder\")\n\t}\n\n\tencryptedName, err := d.encryptFileName(ctx, newName, parentLinkID)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"failed to encrypt filename: %w\", err)\n\t}\n\n\tnewHash, err := d.generateFileNameHash(ctx, newName, parentLinkID)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"failed to generate new hash: %w\", err)\n\t}\n\n\toriginalHash, err := d.getOriginalNameHash(srcLink)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"failed to get original hash: %w\", err)\n\t}\n\n\trenameReq := RenameRequest{","sourceCodeStart":571,"sourceCodeEnd":607,"githubUrl":"https://github.com/AlistGo/alist/blob/843d9dc8149126976b2625911e45a4d3ffd6f2f5/drivers/proton_drive/util.go#L571-L607","documentation":"Error \"cannot rename root folder\" thrown in AlistGo/alist.","triggerScenarios":"Thrown at drivers/proton_drive/util.go:589 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check the storage configuration and the provider's service status, fix the indicated cause, and retry the operation."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"843d9dc8149126976b2625911e45a4d3ffd6f2f5","analyzedAt":"2026-08-15T12:14:11.722Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}