AlistGo/alist · error

failed to list directory: %w

Error message

failed to list directory: %w

What it means

Error "failed to list directory: %w" thrown in AlistGo/alist.

Source

Thrown at drivers/proton_drive/util.go:85

}

func (d *ProtonDrive) searchByPath(ctx context.Context, fullPath string, isFolder bool) (*proton.Link, error) {
	if fullPath == "/" {
		return d.protonDrive.RootLink, nil
	}

	cleanPath := strings.Trim(fullPath, "/")
	pathParts := strings.Split(cleanPath, "/")

	currentLink := d.protonDrive.RootLink

	for i, part := range pathParts {
		isLastPart := i == len(pathParts)-1
		searchForFolder := !isLastPart || isFolder

		entries, err := d.protonDrive.ListDirectory(ctx, currentLink.LinkID)
		if err != nil {
			return nil, fmt.Errorf("failed to list directory: %w", err)

		}

		found := false
		for _, entry := range entries {
			// entry.Name is already decrypted!
			if entry.Name == part && entry.IsFolder == searchForFolder {
				currentLink = entry.Link
				found = true
				break
			}
		}

		if !found {
			return nil, fmt.Errorf("path not found: %s (looking for part: %s)", fullPath, part)
		}
	}

View on GitHub (pinned to 843d9dc814)

Solutions

  1. 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/proton_drive/util.go:85 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/31dc926c7488410c. Report an issue: GitHub.