mirror of
https://github.com/ArchiveBox/ArchiveBox.git
synced 2025-05-17 16:44:26 -04:00
Replaced os.path in schema.py
This commit is contained in:
parent
2c62abb270
commit
7d513b9b19
1 changed files with 2 additions and 3 deletions
|
@ -1,6 +1,5 @@
|
||||||
__package__ = 'archivebox.index'
|
__package__ = 'archivebox.index'
|
||||||
|
|
||||||
import os
|
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
||||||
from datetime import datetime, timedelta
|
from datetime import datetime, timedelta
|
||||||
|
@ -250,7 +249,7 @@ class Link:
|
||||||
@property
|
@property
|
||||||
def link_dir(self) -> str:
|
def link_dir(self) -> str:
|
||||||
from ..config import CONFIG
|
from ..config import CONFIG
|
||||||
return os.path.join(CONFIG['ARCHIVE_DIR'], self.timestamp)
|
return Path(CONFIG['ARCHIVE_DIR']) / self.timestamp
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def archive_path(self) -> str:
|
def archive_path(self) -> str:
|
||||||
|
@ -369,7 +368,7 @@ class Link:
|
||||||
)
|
)
|
||||||
|
|
||||||
return any(
|
return any(
|
||||||
os.path.exists(os.path.join(ARCHIVE_DIR, self.timestamp, path))
|
(Path(ARCHIVE_DIR) / self.timestamp / path).exists()
|
||||||
for path in output_paths
|
for path in output_paths
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue