Parchive / par2cmdline

Official repo for par2cmdline and libpar2
http://parchive.sourceforge.net
GNU General Public License v2.0
723 stars 75 forks source link

Fail earlier during creation if the .par2 file already exists #152

Open rdiez opened 4 years ago

rdiez commented 4 years ago

I have been testing par2's performance with command "par2 create", and I forgot to delete the existing .par2 files before running the test again.

par2 started opening files like this:

Opening: TestData.7z.001
Opening: TestData.7z.002
Opening: TestData.7z.003
Opening: TestData.7z.004
[...]

And then it failed with:

Could not create "[...]/RedundantDataTest.vol00+1.par2": File already exists.

It took par2 more than 1 hour to print that error message.

I wish that par2 could fail earlier instead of waiting for the whole hashing stage to finish.