{"record":{"id":"59a5110a780405aa","repo":"AlistGo/alist","slug":"cannot-move-folder-into-itself-or-its-subfolder","errorCode":null,"errorMessage":"cannot move folder into itself or its subfolder","messagePattern":"cannot move folder into itself or its subfolder","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"drivers/proton_drive/util.go","lineNumber":907,"sourceCode":"\t\treturn \"\", err\n\t}\n\n\tnewKeyPacket, err := dstKR.EncryptSessionKey(sessionKey)\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\n\tnewSplitMessage := crypto.NewPGPSplitMessage(newKeyPacket, oldSplitMessage.DataPacket)\n\n\treturn newSplitMessage.GetArmored()\n}\n\nfunc (d *ProtonDrive) checkCircularMove(ctx context.Context, srcLinkID, dstParentLinkID string) error {\n\tcurrentLinkID := dstParentLinkID\n\n\tfor currentLinkID != \"\" && currentLinkID != d.RootLink.LinkID {\n\t\tif currentLinkID == srcLinkID {\n\t\t\treturn fmt.Errorf(\"cannot move folder into itself or its subfolder\")\n\t\t}\n\n\t\tcurrentLink, err := d.getLink(ctx, currentLinkID)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tcurrentLinkID = currentLink.ParentLinkID\n\t}\n\n\treturn nil\n}\n","sourceCodeStart":889,"sourceCodeEnd":919,"githubUrl":"https://github.com/AlistGo/alist/blob/843d9dc8149126976b2625911e45a4d3ffd6f2f5/drivers/proton_drive/util.go#L889-L919","documentation":"Error \"cannot move folder into itself or its subfolder\" thrown in AlistGo/alist.","triggerScenarios":"Thrown at drivers/proton_drive/util.go:907 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"}