mirror of
https://github.com/ArchiveBox/ArchiveBox
synced 2024-11-10 06:34:16 +00:00
Replaced os.path in favicon.py
This commit is contained in:
parent
ad04fb5300
commit
3fb410a604
1 changed files with 1 additions and 2 deletions
|
@ -1,6 +1,5 @@
|
|||
__package__ = 'archivebox.extractors'
|
||||
|
||||
import os
|
||||
from pathlib import Path
|
||||
|
||||
from typing import Optional
|
||||
|
@ -22,7 +21,7 @@ from ..logging_util import TimedProgress
|
|||
@enforce_types
|
||||
def should_save_favicon(link: Link, out_dir: Optional[str]=None) -> bool:
|
||||
out_dir = out_dir or link.link_dir
|
||||
if os.path.exists(os.path.join(out_dir, 'favicon.ico')):
|
||||
if (Path(out_dir) / 'favicon.ico').exists():
|
||||
return False
|
||||
|
||||
return SAVE_FAVICON
|
||||
|
|
Loading…
Reference in a new issue