AlistGo/alist · error

failed to find source: %w

Error message

failed to find source: %w

What it means

Error "failed to find source: %w" thrown in AlistGo/alist.

Source

Thrown at drivers/proton_drive/util.go:584

	}
	return nil
}

func (d *ProtonDrive) DirectRename(ctx context.Context, srcObj model.Obj, newName string) (model.Obj, error) {
	//fmt.Printf("DEBUG DirectRename: path=%s, newName=%s", srcObj.GetPath(), newName)

	if d.MainShare == nil || d.DefaultAddrKR == nil {
		return nil, fmt.Errorf("missing required fields: MainShare=%v, DefaultAddrKR=%v",
			d.MainShare != nil, d.DefaultAddrKR != nil)
	}

	if d.protonDrive == nil {
		return nil, fmt.Errorf("protonDrive bridge is nil")
	}

	srcLink, err := d.searchByPath(ctx, srcObj.GetPath(), srcObj.IsDir())
	if err != nil {
		return nil, fmt.Errorf("failed to find source: %w", err)
	}

	parentLinkID := srcLink.ParentLinkID
	if parentLinkID == "" {
		return nil, fmt.Errorf("cannot rename root folder")
	}

	encryptedName, err := d.encryptFileName(ctx, newName, parentLinkID)
	if err != nil {
		return nil, fmt.Errorf("failed to encrypt filename: %w", err)
	}

	newHash, err := d.generateFileNameHash(ctx, newName, parentLinkID)
	if err != nil {
		return nil, fmt.Errorf("failed to generate new hash: %w", err)
	}

	originalHash, err := d.getOriginalNameHash(srcLink)

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:584 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/64b601f6a320c73e. Report an issue: GitHub.