mirror of
https://github.com/elliotnunn/machfs.git
synced 2024-12-26 10:32:25 +00:00
DumpHFS: create nonexistent dest dir
This commit is contained in:
parent
4d0927eb65
commit
4db5dd3819
@ -2,6 +2,7 @@
|
||||
|
||||
import argparse
|
||||
from machfs import Volume
|
||||
import os
|
||||
|
||||
args = argparse.ArgumentParser()
|
||||
|
||||
@ -10,6 +11,11 @@ args.add_argument('dir', metavar='OUTPUT', nargs=1, help='Destination folder')
|
||||
|
||||
args = args.parse_args()
|
||||
|
||||
try:
|
||||
os.mkdir(args.dir[0])
|
||||
except FileExistsError:
|
||||
pass
|
||||
|
||||
with open(args.src[0], 'rb') as f:
|
||||
v = Volume()
|
||||
v.read(f.read())
|
||||
|
Loading…
Reference in New Issue
Block a user