Problem
When decompressing archives into the same destination (and merging folders), files with identical names can be silently overwritten.
This happens in the following scenarios:
- Decompress, and on conflict, user chooses the "merge" option.
- Decompress with
--dir .
- Decompress with
--here (equivalent to --dir)
Currently, conflict detection only operates at the folder level. Once a folder has been "accepted", each archive backend writes to files independently, possibly overwriting silently.
Expected behavior
- Check and prompt for conflicts for every single file.
- Ensure consistent behavior across all supported archive formats.
Context
This has been a known limitation that requires a refactor. Solving it would also require moving format-specific safety/sanity checks into the shared layer, since the formats would no longer be writing files directly. And allowing for "renaming" of nested folders that will have files inside of them requires some complex routing logic. Also ensure that logs for subsequent files that had their parents renamed have their paths fixed for their new location (requires a path trie for sure).
Originally posted by @roland-5 in #998 (comment)
Problem
When decompressing archives into the same destination (and merging folders), files with identical names can be silently overwritten.
This happens in the following scenarios:
--dir .--here(equivalent to --dir)Currently, conflict detection only operates at the folder level. Once a folder has been "accepted", each archive backend writes to files independently, possibly overwriting silently.
Expected behavior
Context
This has been a known limitation that requires a refactor. Solving it would also require moving format-specific safety/sanity checks into the shared layer, since the formats would no longer be writing files directly. And allowing for "renaming" of nested folders that will have files inside of them requires some complex routing logic. Also ensure that logs for subsequent files that had their parents renamed have their paths fixed for their new location (requires a path trie for sure).
Originally posted by @roland-5 in #998 (comment)