{"record":{"id":"632a0ef009dcbd17","repo":"AlistGo/alist","slug":"guangyapan-temp-dir-is-not-set","errorCode":null,"errorMessage":"GuangYaPan temp dir is not set","messagePattern":"GuangYaPan temp dir is not set","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/offline_download/tool/add.go","lineNumber":124,"sourceCode":"\t\t\ttempDir = filepath.Join(setting.GetStr(conf.ThunderTempDir), uid)\n\t\t}\n\tcase Open123ToolName:\n\t\tif _, ok := storage.(*_123Open.Open123); ok {\n\t\t\ttempDir = args.DstDirPath\n\t\t} else {\n\t\t\ttempBase := setting.GetStr(conf.Open123TempDir)\n\t\t\tif tempBase == \"\" {\n\t\t\t\treturn nil, errors.New(\"123 Open temp dir is not set\")\n\t\t\t}\n\t\t\ttempDir = filepath.Join(tempBase, uid)\n\t\t}\n\tcase \"GuangYaPan\":\n\t\tif _, ok := storage.(*guangyapan.GuangYaPan); ok {\n\t\t\ttempDir = args.DstDirPath\n\t\t} else {\n\t\t\ttempBase := setting.GetStr(conf.GuangYaPanTempDir)\n\t\t\tif tempBase == \"\" {\n\t\t\t\treturn nil, errors.New(\"GuangYaPan temp dir is not set\")\n\t\t\t}\n\t\t\ttempDir = filepath.Join(tempBase, uid)\n\t\t}\n\t}\n\n\ttaskCreator, _ := ctx.Value(\"user\").(*model.User) // taskCreator is nil when convert failed\n\tt := &DownloadTask{\n\t\tTaskExtension: task.TaskExtension{\n\t\t\tCreator: taskCreator,\n\t\t},\n\t\tUrl:          args.URL,\n\t\tDstDirPath:   args.DstDirPath,\n\t\tTempDir:      tempDir,\n\t\tDeletePolicy: deletePolicy,\n\t\tToolname:     args.Tool,\n\t\ttool:         tool,\n\t}\n\tDownloadTaskManager.Add(t)","sourceCodeStart":106,"sourceCodeEnd":142,"githubUrl":"https://github.com/AlistGo/alist/blob/843d9dc8149126976b2625911e45a4d3ffd6f2f5/internal/offline_download/tool/add.go#L106-L142","documentation":"Same guard as the 123 Open one, but for the GuangYaPan tool: when the destination is not a GuangYaPan storage, the download must stage into conf.GuangYaPanTempDir joined with a uid, and an empty setting aborts the add. This is a configuration error, not a runtime failure of the provider.","triggerScenarios":"Adding an offline download via the GuangYaPan tool with a non-GuangYaPan destination while conf.GuangYaPanTempDir is empty/unset.","commonSituations":"GuangYaPan offline tool enabled without configuring its temp dir; setting cleared when switching destination storages; config restore lost the value.","solutions":["Set the GuangYaPan temp dir setting to a path on the GuangYaPan storage (or other storage with capacity)","Or target a destination directory directly on the GuangYaPan mount to skip staging","Retry the add after saving settings"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// Before adding via the GuangYaPan tool\nif _, ok := storage.(*guangyapan.GuangYaPan); !ok {\n    if setting.GetStr(conf.GuangYaPanTempDir) == \"\" {\n        return errors.New(\"configure GuangYaPanTempDir before cross-storage offline downloads\")\n    }\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Configure the GuangYaPan temp dir when enabling the tool","Re-check settings after config migrations or restores","Point the temp dir at storage with enough free space for staged files"],"tags":["offline-download","guangyapan","config","temp-dir"],"backgroundTag":null,"analyzedSha":"843d9dc8149126976b2625911e45a4d3ffd6f2f5","analyzedAt":"2026-08-15T12:14:11.722Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}