Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exception handling for 7z entries without timestamps #3254

Merged
merged 3 commits into from
Apr 23, 2022

Conversation

TranceLove
Copy link
Collaborator

It seems such archives can be created intentionally.

For 7z archives having entries with no timestamp,

  • they will show as 00:00:00 1970-01-01 when in file manager view
  • they will have last modified date = current timestamp on extracting

Description

Issue tracker

Fixes #3035

Automatic tests

  • Added test cases

Manual tests

  • Done

  • Device: Pixel 2 emulator

  • OS: Android 11

Build tasks success

Successfully running following tasks on local:

  • ./gradlew assembledebug
  • ./gradlew spotlessCheck

Fixes #3035.

For 7z archives having entries with no timestamp,
- they will show as 00:00:00 1970-01-01 when in file manager view
- they will have last modified date = current timestamp on extracting
@TranceLove TranceLove added Issue-Bug Related unexpected behavior or something worth investigating. Area-Compression Related to compression and decompression feature. labels Apr 14, 2022
VishalNehra
VishalNehra previously approved these changes Apr 16, 2022
@VishalNehra VishalNehra merged commit e58a26b into release/3.7 Apr 23, 2022
val lastModifiedDate = try {
entry.lastModifiedDate.time
} catch (e: UnsupportedOperationException) {
Log.w(javaClass.simpleName, "Unable to get modified date for 7zip file")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These should use TAG why was this fixed like this?

@EmmanuelMess EmmanuelMess deleted the bugfix/3035 branch April 23, 2022 21:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Compression Related to compression and decompression feature. Issue-Bug Related unexpected behavior or something worth investigating.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

UnsupportedOperationException on SevenZArchiveEntry.getLastModifiedDate()
3 participants