Feature request - skip overwrite when file contents is identical

Open
#244 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
38/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Quiet
Tech stack
cpp
Domain
backend

Research direction

Start by locating the extraction code that handles an existing destination file and the overwrite or skip choice; the issue does not name files or tests. Check how archive formats expose per-file hashes and how extraction currently writes files. Done means extraction can skip writing when the existing file’s contents match, using hashes where available; the issue does not specify behavior for formats without hashes.

Written by the indexing model from the issue text.

Description

Currently, when during extraction an existing file with the same name as the archived file is encountered, one can either overwrite or skip. It would be great to have the option of overwriting only when the files are actually different.

Benefits are:

  • media sensitive to writes will not suffer from useless writes;
  • media in which reads are much faster than writes could complete extraction much faster.

Like rsync, it makes sense to do this based on hashes; in particular, for archive formats that have per file hashes (even something lousy as CRC32) we can compute the hash only for the existing file and then compare.

Thanks in advance.

Dominant language
C++
Stars
4.6k
Forks
519
PR merge metrics
No merged PRs in 30d

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from ip7z/7zip

All issues in ip7z/7zip

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.