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

--output-dir option doesn't work #171

Closed
iantruslove opened this issue Nov 1, 2019 · 0 comments · Fixed by #172
Closed

--output-dir option doesn't work #171

iantruslove opened this issue Nov 1, 2019 · 0 comments · Fixed by #172

Comments

@iantruslove
Copy link
Contributor

If you specify the --output-dir option, the JSON analyses overwrite the original APKs.

$ docker run -it --rm -v /output:/tmp/output:rw /apks:/apks:ro rednaga:apkid -o /tmp/output -v /apks/foo.apk
Traceback (most recent call last):
  File "/usr/local/bin/apkid", line 11, in <module>
    load_entry_point('apkid', 'console_scripts', 'apkid')()
  File "/apkid/apkid/main.py", line 94, in main
    scanner.scan(input)
  File "/apkid/apkid/apkid.py", line 111, in scan
    self.options.output.write(results)
  File "/apkid/apkid/output.py", line 101, in write
    with open(out_path, 'w') as f:
OSError: [Errno 30] Read-only file system: '/apks/foo.apk'

It's due to using an absolute path as the last arg to os.path.join -- e.g.

>>> os.path.join("/a/b", "/c/d")
'/c/d'
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 a pull request may close this issue.

1 participant