mirror of
https://github.com/ArchiveBox/ArchiveBox.git
synced 2025-05-13 06:34:25 -04: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'
|
__package__ = 'archivebox.extractors'
|
||||||
|
|
||||||
import os
|
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
||||||
from typing import Optional
|
from typing import Optional
|
||||||
|
@ -22,7 +21,7 @@ from ..logging_util import TimedProgress
|
||||||
@enforce_types
|
@enforce_types
|
||||||
def should_save_favicon(link: Link, out_dir: Optional[str]=None) -> bool:
|
def should_save_favicon(link: Link, out_dir: Optional[str]=None) -> bool:
|
||||||
out_dir = out_dir or link.link_dir
|
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 False
|
||||||
|
|
||||||
return SAVE_FAVICON
|
return SAVE_FAVICON
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue