{"record":{"id":"ea6ebdce9969afdb","repo":"AlistGo/alist","slug":"s-id-s","errorCode":null,"errorMessage":"路径冲突: 路径 '%s' 被多个不同的分享ID使用: %s","messagePattern":"路径冲突: 路径 '(.+?)' 被多个不同的分享ID使用: (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"drivers/doubao_share/util.go","lineNumber":274,"sourceCode":"\n\t\t// 添加到路径映射\n\t\tshareConfigs[sharePath] = shareId\n\t}\n\n\treturn shareConfigs, rootShares, nil\n}\n\n// 检测路径冲突\nfunc (d *DoubaoShare) _detectPathConflicts(shareConfigs map[string]string) error {\n\t// 检查直接路径冲突\n\tpathToShareIds := make(map[string][]string)\n\tfor sharePath, id := range shareConfigs {\n\t\tpathToShareIds[sharePath] = append(pathToShareIds[sharePath], id)\n\t}\n\n\tfor sharePath, ids := range pathToShareIds {\n\t\tif len(ids) > 1 {\n\t\t\treturn fmt.Errorf(\"路径冲突: 路径 '%s' 被多个不同的分享ID使用: %s\",\n\t\t\t\tsharePath, strings.Join(ids, \", \"))\n\t\t}\n\t}\n\n\t// 检查层次冲突\n\tfor path1, id1 := range shareConfigs {\n\t\tfor path2, id2 := range shareConfigs {\n\t\t\tif path1 == path2 || id1 == id2 {\n\t\t\t\tcontinue\n\t\t\t}\n\n\t\t\t// 检查前缀冲突\n\t\t\tif strings.HasPrefix(path2, path1+\"/\") || strings.HasPrefix(path1, path2+\"/\") {\n\t\t\t\treturn fmt.Errorf(\"路径冲突: 路径 '%s' (ID: %s) 与路径 '%s' (ID: %s) 存在层次冲突\",\n\t\t\t\t\tpath1, id1, path2, id2)\n\t\t\t}\n\t\t}\n\t}","sourceCodeStart":256,"sourceCodeEnd":292,"githubUrl":"https://github.com/AlistGo/alist/blob/843d9dc8149126976b2625911e45a4d3ffd6f2f5/drivers/doubao_share/util.go#L256-L292","documentation":"During initShareList, _detectPathConflicts found two different share_ids assigned to the exact same mount path in share_ids. The virtual tree would be ambiguous, so startup aborts, listing the colliding ids in the message (Chinese: 'path conflict: path is used by multiple different share ids').","triggerScenarios":"share_ids contains two lines like 'docs|111' and 'docs|222' — same left-hand path, different share ids. Fires at mount initialization or refresh, before any listing.","commonSituations":"Copying a line and pasting a new share id but forgetting to change the path; consolidating shares and leaving the old entry; typos where the path was meant to differ ('docs' vs 'docs2').","solutions":["Deduplicate: give each share id a unique mount path (e.g., 'docs|111' and 'docs-old|222') or delete the stale line.","To mount the same share twice at one path, that is not supported — remove one.","After editing share_ids, refresh/restart the storage so initShareList re-validates."],"exampleFix":"# before\ndocs|7412365891\ndocs|7412399887\n\n# after\ndocs|7412365891\narchive|7412399887","handlingStrategy":"validation","validationCode":"seen := map[string]string{} // path -> share id\nfor _, line := range lines {\n    path, id := splitShareLine(line)\n    if prev, ok := seen[path]; ok && prev != id {\n        return fmt.Errorf(\"duplicate mount path %q used by %s and %s\", path, prev, id)\n    }\n    seen[path] = id\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["One mount path per share id — dedupe before saving.","Use distinct, descriptive path names when mounting multiple shares."],"tags":["doubao-share","config","path-conflict"],"backgroundTag":null,"analyzedSha":"843d9dc8149126976b2625911e45a4d3ffd6f2f5","analyzedAt":"2026-08-15T12:14:11.722Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}