AlistGo/alist · error
same-name dirs cannot be decompressed to
Error message
same-name dirs cannot be decompressed to
What it means
Returned by Alias.ArchiveDecompress when the decompression DESTINATION directory is ambiguous: getReqPath(dstDir) fails with errs.NotImplement because ProtectSameName is on and the output folder exists in multiple destinations mapped under the same alias key.
Source
Thrown at drivers/alias/driver.go:312
}
}
return nil, errs.NotImplement
}
func (d *Alias) ArchiveDecompress(ctx context.Context, srcObj, dstDir model.Obj, args model.ArchiveDecompressArgs) error {
if !d.Writable {
return errs.PermissionDenied
}
srcPath, err := d.getReqPath(ctx, srcObj, false)
if errs.IsNotImplement(err) {
return errors.New("same-name files cannot be decompressed")
}
if err != nil {
return err
}
dstPath, err := d.getReqPath(ctx, dstDir, true)
if errs.IsNotImplement(err) {
return errors.New("same-name dirs cannot be decompressed to")
}
if err != nil {
return err
}
_, err = fs.ArchiveDecompress(ctx, *srcPath, *dstPath, args)
return err
}
var _ driver.Driver = (*Alias)(nil)
View on GitHub (pinned to 843d9dc814)
Solutions
- Choose a single-backend destination (unique key or raw mount path)
- Disable ProtectSameName to accept first-match writes
- Make merged mounts read-only and provide dedicated extraction targets
Example fix
# before extract_out: /disk_a/extracted extract_out: /disk_b/extracted # after extracted_a: /disk_a/extracted
Defensive patterns
Strategy: validation
Validate before calling
// Single-destination check for the extraction output dir
if len(d.pathMap[rootOf(dst)]) > 1 && d.ProtectSameName {
return errors.New("extraction output mirrored; pick one backend")
} Type guard
// Go
func isSameNameErr(err error) bool {
return err != nil && strings.Contains(err.Error(), "same-name")
} Try / catch
if err := d.ArchiveDecompress(ctx, src, dst, args); isSameNameErr(err) {
// re-run extraction targeting a concrete output directory
} else if err != nil { return err } Prevention
- Make extraction output folders single-backend by construction
- Estimate output size first; ambiguous targets also waste space on mirrors
- Reserve merged mounts strictly for reading
When it happens
Trigger: ProtectSameName=true; destination key maps to several backends; output folder present in more than one of them; decompress targets the alias path.
Common situations: Extracting archives into a merged output mount mirrored across storages; batch-extract jobs writing into aggregated folders.
Related errors
- same-name dirs cannot be moved to
- same-name dirs cannot be copied to
- same-name files cannot be decompressed
- same-name dirs cannot make sub-dir
- same-name files cannot be moved
AI-assisted analysis of AlistGo/alist@843d9dc814 (2026-08-15).
Data as JSON: /api/errors/3848d4192f9adc40.
Report an issue: GitHub.