{"record":{"id":"4aebb7ea66183993","repo":"AlistGo/alist","slug":"error","errorCode":null,"errorMessage":"此网盘不支持修改文件名","messagePattern":"此网盘不支持修改文件名","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"drivers/chaoxing/driver.go","lineNumber":170,"sourceCode":"\t}\n\treturn nil\n}\n\nfunc (d *ChaoXing) Rename(ctx context.Context, srcObj model.Obj, newName string) error {\n\tquery := map[string]string{\n\t\t\"bbsid\":    d.Addition.Bbsid,\n\t\t\"folderId\": srcObj.GetID(),\n\t\t\"name\":     newName,\n\t}\n\tpath := \"/pc/resource/updateResourceFolderName\"\n\tif !srcObj.IsDir() {\n\t\t// path = \"/pc/resource/updateResourceFileName\"\n\t\t// query = map[string]string{\n\t\t// \t\"bbsid\":    d.Addition.Bbsid,\n\t\t// \t\"recIds\":   strings.Split(srcObj.GetID(), \"$\")[0],\n\t\t// \t\"name\":     newName,\n\t\t// }\n\t\treturn errors.New(\"此网盘不支持修改文件名\")\n\t}\n\tvar resp ListFileResp\n\t_, err := d.request(path, http.MethodGet, func(req *resty.Request) {\n\t\treq.SetQueryParams(query)\n\t}, &resp)\n\tif err != nil {\n\t\treturn err\n\t}\n\tif resp.Result != 1 {\n\t\tmsg := fmt.Sprintf(\"error:%s\", resp.Msg)\n\t\treturn errors.New(msg)\n\t}\n\treturn nil\n}\n\nfunc (d *ChaoXing) Copy(ctx context.Context, srcObj, dstDir model.Obj) error {\n\t// TODO copy obj, optional\n\treturn errs.NotImplement","sourceCodeStart":152,"sourceCodeEnd":188,"githubUrl":"https://github.com/AlistGo/alist/blob/843d9dc8149126976b2625911e45a4d3ffd6f2f5/drivers/chaoxing/driver.go#L152-L188","documentation":"Hard-coded refusal in ChaoXing Rename: renaming files (as opposed to folders) is not supported, because the file-rename endpoint is commented out in the source. Only updateResourceFolderName is implemented for directories.","triggerScenarios":"Calling Rename on an object where srcObj.IsDir() is false — i.e. any file. The driver returns this Chinese message ('this netdisk does not support renaming files') before making any request.","commonSituations":"A user or script tries to rename a file via web UI/API/webdav on a ChaoXing storage; sync tools attempt rename during two-way sync.","solutions":["Do not attempt file renames on ChaoXing storages; only folder renames are supported","If a file must be 'renamed', download and re-upload it under the new name, then delete the original","Configure sync tools to skip renames (one-way sync) for this storage"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"if !srcObj.IsDir() {\n    return errors.New(\"file rename unsupported on chaoxing; use copy+delete\")\n}","typeGuard":"func renameSupported(obj model.Obj) bool { return obj.IsDir() }","tryCatchPattern":"if err := d.Rename(ctx, obj, name); err != nil && strings.Contains(err.Error(), \"不支持修改文件名\") { /* fall back to re-upload under new name */ }","preventionTips":["Offer rename UI affordances only for folders on ChaoXing","Use upload-new + delete-old for file renames","Mark storage capability 'no file rename' in tooling"],"tags":["chaoxing","rename","not-supported"],"backgroundTag":null,"analyzedSha":"843d9dc8149126976b2625911e45a4d3ffd6f2f5","analyzedAt":"2026-08-15T12:14:11.722Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}