mirror of
https://github.com/iKarith/cppo-ng.git
synced 2024-06-01 21:41:34 +00:00
Fix extract single files
Dunno when this was broken, but it was. It's fixed now.
This commit is contained in:
parent
5d97a75efb
commit
27a097432f
|
@ -1052,17 +1052,16 @@ def run_cppo(args: list):
|
||||||
quit_now(2)
|
quit_now(2)
|
||||||
|
|
||||||
if len(args) == 4:
|
if len(args) == 4:
|
||||||
print(args)
|
|
||||||
g.extract_file = args[2]
|
g.extract_file = args[2]
|
||||||
|
|
||||||
if g.extract_file:
|
if g.extract_file:
|
||||||
targetPath = args[3]
|
targetPath = args[3]
|
||||||
if os.path.isdir(targetPath):
|
if os.path.isdir(targetPath):
|
||||||
g.target_dir = targetPath
|
g.target_dir = targetPath
|
||||||
elif targetPath.rsplit("/", 1) > 1:
|
elif len(targetPath.rsplit("/", 1)) > 1:
|
||||||
g.target_dir, g.target_name = targetPath.rsplit("/", 1)
|
g.target_dir, g.target_name = targetPath.rsplit("/", 1)
|
||||||
if not os.path.isdir(g.target_dir):
|
if not os.path.isdir(g.target_dir):
|
||||||
print("Target directory not found.")
|
print("Target directory {} not found.".format(g.target_dir))
|
||||||
quit_now(2)
|
quit_now(2)
|
||||||
else:
|
else:
|
||||||
if not g.catalog_only:
|
if not g.catalog_only:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user