You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe your issue:
When applying a filter for extraction, QArchive still emits a progress signal for the filtered files (filtered out that is, the files that should not be extracted), which is not distinguishable from extracted files.
The reason is that ExtractorPrivate::writeData() retuns "NoError" both for an extracted file and a filtered file, resulting in the same behavior in ExtractorPrivate::extract().
Adding a new Error enum (NoErrorFiltered) and then emitting the progress signal with '-1' for 'entries' allows the slot to distinguish between a filtered file progress and an extracted one.
There might be a better way, but this one seems to work for me at least.
All tests are passing (but I only tested wish 5.15.2).
Attached is a patch. (interesting that GitHub does not support patch files...)
The text was updated successfully, but these errors were encountered:
theLSB
changed the title
No distinguishable progress signal is being emitted for file exacted or filtered
A progress signal is being emitted for file exacted or filtered making both cases non distinguishable
Oct 27, 2022
theLSB
changed the title
A progress signal is being emitted for file exacted or filtered making both cases non distinguishable
A progress signal is being emitted for file extracted or filtered making both cases non distinguishable
Oct 27, 2022
I have made this a bug, since extraction progress notifies for the extracted files, if it also notifies for filtered files as if they are extracted when they are not, that is a wrong behavior, and thus a bug.
@theLSB I think we can have a boolean at the end of the progress signal which is true when it's skipped or filtered. is that fine for you? This way we don't break any public API just to be safe. Also when we emit with entries -1 for filtered files, it might be confusing for some developers (ex: when they directly hook this to a progress bar, the behavior would be super weird don't you think?)
Select your issue type: (check at least one)
Describe your issue:
When applying a filter for extraction, QArchive still emits a progress signal for the filtered files (filtered out that is, the files that should not be extracted), which is not distinguishable from extracted files.
The reason is that ExtractorPrivate::writeData() retuns "NoError" both for an extracted file and a filtered file, resulting in the same behavior in ExtractorPrivate::extract().
Adding a new Error enum (NoErrorFiltered) and then emitting the progress signal with '-1' for 'entries' allows the slot to distinguish between a filtered file progress and an extracted one.
There might be a better way, but this one seems to work for me at least.
All tests are passing (but I only tested wish 5.15.2).
Attached is a patch. (interesting that GitHub does not support patch files...)
Ways to Reproduce the issue (optional):
NoErrorFiltered.zip
The text was updated successfully, but these errors were encountered: