mirror of
https://github.com/Garmelon/PFERD.git
synced 2023-12-21 10:23:01 +01:00
Fix handling of empty args.folder
This commit is contained in:
parent
fcb3884a8f
commit
2d64409542
@ -59,7 +59,6 @@ def main() -> None:
|
|||||||
|
|
||||||
cookie_jar.load_cookies()
|
cookie_jar.load_cookies()
|
||||||
|
|
||||||
folder = Path(args.folder)
|
|
||||||
if args.folder is None:
|
if args.folder is None:
|
||||||
element_name = crawler.find_element_name(args.url)
|
element_name = crawler.find_element_name(args.url)
|
||||||
if not element_name:
|
if not element_name:
|
||||||
@ -67,6 +66,8 @@ def main() -> None:
|
|||||||
return
|
return
|
||||||
folder = Path(element_name)
|
folder = Path(element_name)
|
||||||
cookie_jar.save_cookies()
|
cookie_jar.save_cookies()
|
||||||
|
else:
|
||||||
|
folder = Path(args.folder)
|
||||||
|
|
||||||
# files may not escape the pferd_root with relative paths
|
# files may not escape the pferd_root with relative paths
|
||||||
# note: Path(Path.cwd, Path(folder)) == Path(folder) if it is an absolute path
|
# note: Path(Path.cwd, Path(folder)) == Path(folder) if it is an absolute path
|
||||||
|
Loading…
Reference in New Issue
Block a user