mirror of
https://github.com/ArchiveBox/ArchiveBox
synced 2024-11-14 00:17:08 +00:00
Merge branch 'dev'
This commit is contained in:
commit
bfa5411a7c
2 changed files with 5 additions and 1 deletions
|
@ -28,7 +28,7 @@ def ShellError(cmd: List[str], result: CompletedProcess, lines: int=20) -> Archi
|
|||
# parse out last line of stderr
|
||||
return ArchiveError(
|
||||
f'Got {cmd[0]} response code: {result.returncode}).',
|
||||
*(
|
||||
" ".join(
|
||||
line.strip()
|
||||
for line in (result.stdout + result.stderr).decode().rsplit('\n', lines)[-lines:]
|
||||
if line.strip()
|
||||
|
|
|
@ -180,5 +180,9 @@ def wget_output_path(link: Link) -> Optional[str]:
|
|||
|
||||
if str(search_dir) == link.link_dir:
|
||||
break
|
||||
|
||||
search_dir = Path(link.link_dir) / domain(link.url).replace(":", "+") / urldecode(full_path)
|
||||
if not search_dir.is_dir():
|
||||
return str(search_dir.relative_to(link.link_dir))
|
||||
|
||||
return None
|
||||
|
|
Loading…
Reference in a new issue