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

extractodx: Create outdir if not present #122

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

JaCzekanski
Copy link

@JaCzekanski JaCzekanski commented Feb 7, 2024

Allows binaries to be extracted to --outdir without having to manually create it.

Before

$ python extractodx.py --file ../FL_3Q0980654_X921.odx --outdir ../X921/
FD_7000FLASHDATA
Traceback (most recent call last):
  File "/Users/jakubczekanski/Downloads/3q0/VW_Flash-master/extractodx.py", line 225, in <module>
    with open(os.path.join(args.outdir, data_block), "wb") as dataFile:
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: '../X921/FD_7000FLASHDATA'

After

$ python extractodx.py --file ../FL_3Q0980654_X921.odx --outdir ../X921/
FD_7000FLASHDATA
FD_8000FLASHDATA

Allows binaries to be extracted to `--outdir` without having to manually create it.
@JaCzekanski
Copy link
Author

@bri3d Are you okay with this patch? Please merge it when you find the time.
I don't have the permission to close&merge it.
Screenshot 2024-03-20 at 21 28 05

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.

None yet

2 participants