E3SM-Project / zstash

Long term HPSS archiving tool for E3SM
BSD 3-Clause "New" or "Revised" License
8 stars 11 forks source link

[Feature]: Add `include-parent-in-path` parameter #345

Open forsyth2 opened 2 months ago

forsyth2 commented 2 months ago

How will this affect the next version number?

New feature (increment MINOR version)

Is your feature request related to a problem?

@TonyB9000 ran into this issue: if someone were to “zstash extract” any two archives in the same PWD, the extracted files would clobber one another – because while they are distinguished by archive-NAME, they are not distinguished by archive-PATH within the archive.

Describe the solution you'd like

@TonyB9000's suggestion: a special zstash flag “—include-parent-in-path”, so that if hist-BCRC were the target directory, the archived file paths would begin with that value (especially if “—cache ” is supplied). That would require zstash to “cd” up one directory and prefix the target basename to every supplied pattern.

Describe alternatives you've considered

No response

Additional context

No response