AlistGo/alist · error
no matching share path found: %s
Error message
no matching share path found: %s
What it means
_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).
Source
Thrown at drivers/doubao_share/util.go:552
// 检查是否匹配当前路径的第一部分
parts := strings.SplitN(cleanPath, "/", 2)
if len(parts) > 0 && parts[0] == rootFile.ShareID {
if len(parts) > 1 {
return rootFile.ShareID, parts[1], nil
}
return rootFile.ShareID, "", nil
}
}
}
// 查找匹配此路径的分享或虚拟目录
share, relPath := _findShareByPath(d.RootFiles, cleanPath)
if share != nil {
return share.ShareID, relPath, nil
}
log.Warnf("[doubao_share] No matching share path found: %s", dirPath)
return "", "", fmt.Errorf("no matching share path found: %s", dirPath)
}
// convertToFileObject 将File转换为FileObject
func (d *DoubaoShare) convertToFileObject(file File, shareId string, relativePath string) *FileObject {
// 构建文件对象
obj := &FileObject{
Object: model.Object{
ID: file.ID,
Name: file.Name,
Size: file.Size,
Modified: time.Unix(file.UpdateTime, 0),
Ctime: time.Unix(file.CreateTime, 0),
IsFolder: file.NodeType == DirectoryType,
Path: path.Join(relativePath, file.Name),
},
ShareID: shareId,
Key: file.Key,
NodeID: file.ID,View on GitHub (pinned to 843d9dc814)
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.
Example fix
# before share_ids = "mydocs|7412365891" # user browses /docs # after share_ids = "docs|7412365891"
Defensive patterns
Strategy: validation
Validate before calling
cleanPath := normalizePath(dirPath) // strip duplicate/trailing slashes
if _, _, err := d.resolveShareForPath(cleanPath); err != nil {
// refresh cache first; stale listings are the usual cause
d.ClearCache()
} Try / catch
if _, _, err := d._getShareIdAndPath(dirPath); err != nil && strings.Contains(err.Error(), "no matching share path found") {
d.ClearCache() // stale directory cache after share_ids edits
if _, _, err2 := d._getShareIdAndPath(strings.Trim(dirPath, "/")); err2 != nil {
return err2 // genuinely unconfigured path
}
} Prevention
- Clear/refresh the storage cache after editing share_ids.
- Keep path spelling and slash style consistent between config and clients.
When it happens
Trigger: 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.
Common situations: 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.
Related errors
- share_ids is empty
- no valid share_ids found
- no share_ids found
- 路径冲突: 路径 '%s' 被多个不同的分享ID使用: %s
- 路径冲突: 路径 '%s' (ID: %s) 与路径 '%s' (ID: %s) 存在层次冲突
AI-assisted analysis of AlistGo/alist@843d9dc814 (2026-08-15).
Data as JSON: /api/errors/73a213806a5ad1cf.
Report an issue: GitHub.