Skip to content

bug: duplicate entry name causes "File exists" abort instead of graceful skip #129

@bug-ops

Description

@bug-ops

Summary

When a TAR archive contains two entries with the same path (e.g. a hardlink entry followed by a plain file, or two plain files), exarch aborts the entire extraction with File exists (os error 17) instead of skipping the conflicting entry.

Reproduction

Archive contains (in order):

  1. legit.txt — regular file, content legit
  2. link_to_legit — regular file, content OVERWRITTEN
  3. link_to_legit — hardlink to legit.txt

Extraction without --force:

Error: File exists (os error 17)
WARNING: Extraction was stopped. 2 items (2 files, 0 directories, 0 symlinks) were written to disk before the error.

Expected behavior

Conflicting duplicate entry should be skipped (with a warning in the report) rather than aborting the entire extraction.

Actual behavior

Extraction aborts on the first duplicate entry. Partial extraction leaves the destination in an inconsistent state.

Severity

Medium — affects archives created by tools that produce duplicate entries (e.g. some tar implementations with metadata entries). Not a security escape, but a reliability issue.

Notes

With --force, exarch would overwrite, which may be the desired behavior. The issue is that without --force, there is no graceful fallback — just an abort.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions