GSam / dex2jar

Automatically exported from code.google.com/p/dex2jar
0 stars 0 forks source link

Error when filename or arguments contains spaces (Patch Attached) #177

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
Run any of the d2j-* scripts with arguments containing spaces. For example:

$ ./d2j-dex2jar.sh /tmp/some\ directory/classes.dex 

What is the expected output? What do you see instead?
I would expect dex2jar to convert the dex file to a jar file. Instead I get:

dex2jar /tmp/some -> some-dex2jar.jar
java.io.FileNotFoundException: File '/tmp/some' does not exist
    at org.apache.commons.io.FileUtils.openInputStream(FileUtils.java:56)
    at org.apache.commons.io.FileUtils.readFileToByteArray(FileUtils.java:40)
    at com.googlecode.dex2jar.reader.DexFileReader.<init>(DexFileReader.java:240)
    at com.googlecode.dex2jar.tools.Dex2jarCmd.doCommandLine(Dex2jarCmd.java:103)
    at com.googlecode.dex2jar.tools.BaseCmd.doMain(BaseCmd.java:168)
    at com.googlecode.dex2jar.tools.Dex2jarCmd.main(Dex2jarCmd.java:34)

What version of the product are you using? On what operating system?
dex2jar-0.0.9.14 on Linux

Please provide any additional information below.
The patch at https://gist.github.com/hackedd/5666696 fixes the problem by 
quoting the "$@" used in sh_template.

(I've uploaded the patch as a gist because the Google Code issue attachment 
storage quota is exceeded.)

Original issue reported on code.google.com by paulhooi...@gmail.com on 28 May 2013 at 10:40