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

Files with ambiguous names crash on extraction : Fixed #4176

Merged
merged 2 commits into from
Jul 8, 2024

Conversation

pratikmhatre
Copy link
Contributor

Description

This crash issue is easily reproducible by renaming any file with one of "zip/tar/rar/7z" and clicking on Extract option for the same. This is happening because, as per the current code, every file having name ending with one of above is treated as a compressed file and Extract option is then enabled for it. On clicking the Extract the code tries to fetch the file name and the code then crashes as there is no filename present except for the extension itself.

+ boolean hasFileName = compressedName.contains(".");

Issue tracker

Fixes #4146

Automatic tests

  • Added test cases

Manual tests

  • Done

Build tasks success

Successfully running following tasks on local:

  • ./gradlew assembledebug
  • ./gradlew spotlessCheck

@VishnuSanal
Copy link
Member

@pratikmhatre please run spotless ./gradlew spotlessApply

@pratikmhatre
Copy link
Contributor Author

@pratikmhatre please run spotless ./gradlew spotlessApply

Oh, I missed this. I ran it and pushed the changes now. Sorry ;-)

@VishalNehra VishalNehra merged commit 978fa99 into TeamAmaze:release/4.0 Jul 8, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

StringIndexOutOfBoundsException on CompressedHelper#getFileName
3 participants