mirror of
https://github.com/pirate/ArchiveBox.git
synced 2025-08-28 00:30:03 +02:00
Replaced os.path in favicon.py
This commit is contained in:
committed by
Cristian Vargas
parent
ad04fb5300
commit
3fb410a604
@@ -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
|
||||||
|
Reference in New Issue
Block a user