{"record":{"id":"73a213806a5ad1cf","repo":"AlistGo/alist","slug":"no-matching-share-path-found-s","errorCode":null,"errorMessage":"no matching share path found: %s","messagePattern":"no matching share path found: (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"drivers/doubao_share/util.go","lineNumber":552,"sourceCode":"\t\t\t// 检查是否匹配当前路径的第一部分\n\t\t\tparts := strings.SplitN(cleanPath, \"/\", 2)\n\t\t\tif len(parts) > 0 && parts[0] == rootFile.ShareID {\n\t\t\t\tif len(parts) > 1 {\n\t\t\t\t\treturn rootFile.ShareID, parts[1], nil\n\t\t\t\t}\n\t\t\t\treturn rootFile.ShareID, \"\", nil\n\t\t\t}\n\t\t}\n\t}\n\n\t// 查找匹配此路径的分享或虚拟目录\n\tshare, relPath := _findShareByPath(d.RootFiles, cleanPath)\n\tif share != nil {\n\t\treturn share.ShareID, relPath, nil\n\t}\n\n\tlog.Warnf(\"[doubao_share] No matching share path found: %s\", dirPath)\n\treturn \"\", \"\", fmt.Errorf(\"no matching share path found: %s\", dirPath)\n}\n\n// convertToFileObject 将File转换为FileObject\nfunc (d *DoubaoShare) convertToFileObject(file File, shareId string, relativePath string) *FileObject {\n\t// 构建文件对象\n\tobj := &FileObject{\n\t\tObject: model.Object{\n\t\t\tID:       file.ID,\n\t\t\tName:     file.Name,\n\t\t\tSize:     file.Size,\n\t\t\tModified: time.Unix(file.UpdateTime, 0),\n\t\t\tCtime:    time.Unix(file.CreateTime, 0),\n\t\t\tIsFolder: file.NodeType == DirectoryType,\n\t\t\tPath:     path.Join(relativePath, file.Name),\n\t\t},\n\t\tShareID:  shareId,\n\t\tKey:      file.Key,\n\t\tNodeID:   file.ID,","sourceCodeStart":534,"sourceCodeEnd":570,"githubUrl":"https://github.com/AlistGo/alist/blob/843d9dc8149126976b2625911e45a4d3ffd6f2f5/drivers/doubao_share/util.go#L534-L570","documentation":"_getShareIdAndPath maps a requested directory path to a configured share; after checking exact root matches and scanning the tree via _findShareByPath, no share covers the path. The mount cannot resolve dirPath to any share_id, so the listing fails (also logged as a warning).","triggerScenarios":"Browsing into a path that exists in the virtual tree's parent listing but matches no configured share line — e.g., a stale cached directory entry after share_ids was edited, a path with different casing or an extra/missing trailing slash, or a share line whose mount path differs from what the UI shows.","commonSituations":"User edited share_ids and renamed mount paths while the directory cache still lists old folders; clients (WebDAV/rsync) probing paths like '/dir/' vs '/dir'; copy-pasting paths with unicode normalization differences.","solutions":["Refresh the storage / clear the directory cache so listings reflect the current share_ids config.","Compare the requested path (in the error text) character-by-character with the mount paths in share_ids — fix casing, slashes, or whitespace.","If the path should exist, add or fix the corresponding 'path|share_id' line and re-init."],"exampleFix":"# before\nshare_ids = \"mydocs|7412365891\"   # user browses /docs\n\n# after\nshare_ids = \"docs|7412365891\"","handlingStrategy":"validation","validationCode":"cleanPath := normalizePath(dirPath) // strip duplicate/trailing slashes\nif _, _, err := d.resolveShareForPath(cleanPath); err != nil {\n    // refresh cache first; stale listings are the usual cause\n    d.ClearCache()\n}","typeGuard":null,"tryCatchPattern":"if _, _, err := d._getShareIdAndPath(dirPath); err != nil && strings.Contains(err.Error(), \"no matching share path found\") {\n    d.ClearCache() // stale directory cache after share_ids edits\n    if _, _, err2 := d._getShareIdAndPath(strings.Trim(dirPath, \"/\")); err2 != nil {\n        return err2 // genuinely unconfigured path\n    }\n}","preventionTips":["Clear/refresh the storage cache after editing share_ids.","Keep path spelling and slash style consistent between config and clients."],"tags":["doubao-share","path-resolution","config"],"backgroundTag":null,"analyzedSha":"843d9dc8149126976b2625911e45a4d3ffd6f2f5","analyzedAt":"2026-08-15T12:14:11.722Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}