alist/cmd
okatu-loli 69464a2825 fix(mcp): initialize task manager so async fs operations don't panic
cmd/mcp.go (added in v3.60.0) calls Init() and LoadStorages() but skips
bootstrap.InitTaskManager(). As a result fs.CopyTaskManager,
fs.UploadTaskManager, fs.MoveTaskManager and friends are nil, and any
MCP fs_copy / fs_move on a cross-storage target panics at
internal/fs/copy.go (CopyTaskManager.Add) with a nil-pointer dereference
that the MCP handler surfaces as:

    panic recovered in fs_copy tool handler:
    runtime error: invalid memory address or nil pointer dereference

Mirror the cmd/server.go bootstrap order so the MCP command initializes
the task manager too.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-29 09:37:25 +08:00
..
flags feat: optional log to std 2023-03-05 15:07:06 +08:00
admin.go perf(db): release database before exit 2023-09-05 13:04:27 +08:00
cancel2FA.go perf(db): release database before exit 2023-09-05 13:04:27 +08:00
common.go refactor(convert_role): Improve role conversion logic for legacy formats (#9219) 2025-07-26 15:20:08 +08:00
kill.go feat(archive): archive manage (#7817) 2025-01-18 23:28:12 +08:00
lang.go fix(lang): initialize configuration in LangCmd before generating language JSON file 2025-03-16 16:37:33 +08:00
mcp.go fix(mcp): initialize task manager so async fs operations don't panic 2026-05-29 09:37:25 +08:00
restart.go feat: export all cmd (#2746) 2022-12-18 19:53:39 +08:00
root.go fix: update documentation links to point to the new domain And fix 189pc getToken fail 2025-06-27 16:28:09 +08:00
server.go Merge branch 'main' into feature/frp-support 2026-04-19 10:26:24 +08:00
start.go feat: export all cmd (#2746) 2022-12-18 19:53:39 +08:00
stop_default.go feat(archive): archive manage (#7817) 2025-01-18 23:28:12 +08:00
stop_windows.go feat(archive): archive manage (#7817) 2025-01-18 23:28:12 +08:00
storage.go perf(db): release database before exit 2023-09-05 13:04:27 +08:00
user.go chore(cmd): change come output for admin command 2023-08-06 23:02:22 +08:00
version.go refactor(cmd): use std runtime package to get go version info (#7964) 2025-02-09 18:30:56 +08:00