AlistGo/alist · error
invalid file id %q: %w
Error message
invalid file id %q: %w
What it means
Error "invalid file id %q: %w" thrown in AlistGo/alist.
Source
Thrown at drivers/123_open/util.go:30
)
// timeLayout is the timestamp format returned by the open platform, expressed
// in Beijing time.
const timeLayout = "2006-01-02 15:04:05"
// cst is the timezone the open platform reports its timestamps in.
var cst = time.FixedZone("CST", 8*3600)
// parseFileID turns an AList object ID into the numeric file ID used by the
// API. The root directory is 0.
func parseFileID(id string) (int64, error) {
id = strings.TrimSpace(id)
if id == "" || id == "root" {
return 0, nil
}
fileID, err := strconv.ParseInt(id, 10, 64)
if err != nil {
return 0, fmt.Errorf("invalid file id %q: %w", id, err)
}
return fileID, nil
}
// parseTime parses an open platform timestamp, returning the zero time when it
// is missing or malformed.
func parseTime(s string) time.Time {
if s == "" {
return time.Time{}
}
t, err := time.ParseInLocation(timeLayout, s, cst)
if err != nil {
return time.Time{}
}
return t
}
// fileToObj maps a v2 file list entry onto an AList object. The Etag exposed byView on GitHub (pinned to 843d9dc814)
Solutions
- Inspect the underlying error details in the message, fix the indicated cause (credentials, network, or provider-side failure), and retry.
When it happens
Trigger: Thrown at drivers/123_open/util.go:30 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of AlistGo/alist@843d9dc814 (2026-08-15).
Data as JSON: /api/errors/b48435d594b9b4f1.
Report an issue: GitHub.