{"record":{"id":"8d4d241cced29345","repo":"AlistGo/alist","slug":"savestrmlocalpath-is-required","errorCode":null,"errorMessage":"SaveStrmLocalPath is required","messagePattern":"SaveStrmLocalPath is required","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"drivers/strm/driver.go","lineNumber":45,"sourceCode":"\tdownloadExtSet   map[string]struct{}\n\tnormalizedMode   string\n\tnormalizedPrefix string\n}\n\nfunc (d *Strm) Config() driver.Config {\n\treturn config\n}\n\nfunc (d *Strm) GetAddition() driver.Additional {\n\treturn &d.Addition\n}\n\nfunc (d *Strm) Init(ctx context.Context) error {\n\tif strings.TrimSpace(d.Paths) == \"\" {\n\t\treturn errors.New(\"paths is required\")\n\t}\n\tif d.SaveStrmToLocal && strings.TrimSpace(d.SaveStrmLocalPath) == \"\" {\n\t\treturn errors.New(\"SaveStrmLocalPath is required\")\n\t}\n\n\td.aliases = parseAliases(d.Paths)\n\tif len(d.aliases) == 0 {\n\t\treturn errors.New(\"no valid path mapping found\")\n\t}\n\n\td.autoFlatten = len(d.aliases) == 1\n\td.singleRootKey = \"\"\n\tif d.autoFlatten {\n\t\tfor k := range d.aliases {\n\t\t\td.singleRootKey = k\n\t\t}\n\t}\n\n\td.mediaExtSet = parseExtSet(defaultIfEmpty(d.FilterFileTypes, defaultMediaExt))\n\td.downloadExtSet = parseExtSet(defaultIfEmpty(d.DownloadFileTypes, defaultDownloadExt))\n\td.normalizedPrefix = normalizePrefix(defaultIfEmpty(d.PathPrefix, \"/d\"))","sourceCodeStart":27,"sourceCodeEnd":63,"githubUrl":"https://github.com/AlistGo/alist/blob/843d9dc8149126976b2625911e45a4d3ffd6f2f5/drivers/strm/driver.go#L27-L63","documentation":"The Strm driver validates that when 'SaveStrmToLocal' is enabled, a destination directory ('SaveStrmLocalPath') must also be configured, because the feature writes generated .strm files into that local folder. Enabling the toggle without a target path is a half-finished configuration and Init aborts.","triggerScenarios":"Addition with SaveStrmLocalStorage=true (or however the flag serializes) and SaveStrmLocalPath empty/whitespace.","commonSituations":"User toggles 'save strm to local' in the UI but misses the new path input that appears; Path field cleared during a config edit and re-saved; Relative path consisting only of spaces pasted in","solutions":["Set SaveStrmLocalPath to an absolute directory the alist process can write to (e.g. /config/strm)","Or disable SaveStrmLocalStorage if local .strm export is not needed","Verify the directory exists and has write permission after saving"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"if addition.SaveStrmToLocal && strings.TrimSpace(addition.SaveStrmLocalPath) == \"\" {\n    return errors.New(\"SaveStrmLocalPath is required when SaveStrmToLocal is enabled\")\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Treat the save-to-local toggle and its path as one unit when editing config","Pre-create the target directory and check write permissions","Disable the toggle if you do not actually need local .strm copies"],"tags":["strm","config","init","local-storage"],"backgroundTag":null,"analyzedSha":"843d9dc8149126976b2625911e45a4d3ffd6f2f5","analyzedAt":"2026-08-15T12:14:11.722Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}