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

"Uncaught exception XADRegexException" when extracting a file with brackets in name #131

Open
kyeastmood opened this issue Nov 11, 2020 · 1 comment

Comments

@kyeastmood
Copy link

Version: 1.10.1

When archive contains a file with name like [].txt or [.txt and unar is invoked like this:
unar brackets.zip "brackets/[].txt"
or
unar brackets.zip "brackets/[.txt"

The error message is:
Uncaught exception XADRegexException, reason: Could not compile regex "^brackets/[]\.txt$": Unmatched [, [^, [:, [., or [=

A name with only a closing bracket e.g. ].txt seems to be OK:
unar brackets.zip "brackets/].txt"

Example archive:
brackets.zip

Thanks.

@kyeastmood
Copy link
Author

Also when the name is like [text].txt there is no exception but the file is not extracted and unar returns exit code 0.

user@host:~/test$ unar brackets.zip "brackets/[text].txt"
brackets.zip: Zip
No files extracted.
user@host:~/test$ echo $?
0

With name [text.txt:

user@host:~/test$ unar brackets.zip "brackets/[text.txt"
brackets.zip: : Uncaught exception XADRegexException, reason: Could not compile regex "^brackets/[text\.txt$": Unmatched [, [^, [:, [., or [=

With name text].txt everything is OK.

Updated archive:
brackets.zip

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

No branches or pull requests

1 participant