AlistGo/alist · error

failed to create directory: %w

Error message

failed to create directory: %w

What it means

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

Source

Thrown at drivers/proton_drive/driver.go:285

	}, nil
}

func (d *ProtonDrive) MakeDir(ctx context.Context, parentDir model.Obj, dirName string) (model.Obj, error) {
	var parentLinkID string

	if parentDir.GetPath() == "/" {
		parentLinkID = d.protonDrive.RootLink.LinkID
	} else {
		link, err := d.searchByPath(ctx, parentDir.GetPath(), true)
		if err != nil {
			return nil, err
		}
		parentLinkID = link.LinkID
	}

	_, err := d.protonDrive.CreateNewFolderByID(ctx, parentLinkID, dirName)
	if err != nil {
		return nil, fmt.Errorf("failed to create directory: %w", err)
	}

	newDir := &model.Object{
		Name:     dirName,
		IsFolder: true,
		Modified: time.Now(),
	}
	return newDir, nil
}

func (d *ProtonDrive) Move(ctx context.Context, srcObj, dstDir model.Obj) (model.Obj, error) {
	return d.DirectMove(ctx, srcObj, dstDir)
}

func (d *ProtonDrive) Rename(ctx context.Context, srcObj model.Obj, newName string) (model.Obj, error) {

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

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/driver.go:285 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/7d3c936d3a4cfe3c. Report an issue: GitHub.