fix using os.path calls on pathlib paths
This commit is contained in:
parent
ea209fa575
commit
15e58bd366
1 changed files with 2 additions and 2 deletions
|
@ -180,9 +180,9 @@ def wget_output_path(link: Link) -> Optional[str]:
|
|||
# /some/other/url.o4g -> some binary unrecognized ext)
|
||||
# test this with archivebox add --depth=1 https://getpocket.com/users/nikisweeting/feed/all
|
||||
last_part_of_url = urldecode(full_path.rsplit('/', 1)[-1])
|
||||
for file_present in os.listdir(search_dir):
|
||||
for file_present in search_dir.iterdir():
|
||||
if file_present == last_part_of_url:
|
||||
return os.path.join(path_from_link_dir, file_present)
|
||||
return search_dir / file_present
|
||||
|
||||
# Move up one directory level
|
||||
search_dir = search_dir.parent
|
||||
|
|
Loading…
Reference in a new issue