AlistGo/alist · warning
此网盘不支持修改文件名
Error message
此网盘不支持修改文件名
What it means
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.
Source
Thrown at drivers/chaoxing/driver.go:170
}
return nil
}
func (d *ChaoXing) Rename(ctx context.Context, srcObj model.Obj, newName string) error {
query := map[string]string{
"bbsid": d.Addition.Bbsid,
"folderId": srcObj.GetID(),
"name": newName,
}
path := "/pc/resource/updateResourceFolderName"
if !srcObj.IsDir() {
// path = "/pc/resource/updateResourceFileName"
// query = map[string]string{
// "bbsid": d.Addition.Bbsid,
// "recIds": strings.Split(srcObj.GetID(), "$")[0],
// "name": newName,
// }
return errors.New("此网盘不支持修改文件名")
}
var resp ListFileResp
_, err := d.request(path, http.MethodGet, func(req *resty.Request) {
req.SetQueryParams(query)
}, &resp)
if err != nil {
return err
}
if resp.Result != 1 {
msg := fmt.Sprintf("error:%s", resp.Msg)
return errors.New(msg)
}
return nil
}
func (d *ChaoXing) Copy(ctx context.Context, srcObj, dstDir model.Obj) error {
// TODO copy obj, optional
return errs.NotImplementView on GitHub (pinned to 843d9dc814)
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
Defensive patterns
Strategy: validation
Validate before calling
if !srcObj.IsDir() {
return errors.New("file rename unsupported on chaoxing; use copy+delete")
} Type guard
func renameSupported(obj model.Obj) bool { return obj.IsDir() } Try / catch
if err := d.Rename(ctx, obj, name); err != nil && strings.Contains(err.Error(), "不支持修改文件名") { /* fall back to re-upload under new name */ } Prevention
- 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
When it happens
Trigger: 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.
Common situations: 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.
Related errors
AI-assisted analysis of AlistGo/alist@843d9dc814 (2026-08-15).
Data as JSON: /api/errors/4aebb7ea66183993.
Report an issue: GitHub.