mirror of
https://github.com/ArchiveBox/ArchiveBox.git
synced 2025-06-05 17:14:25 -04:00
minor build fixes
This commit is contained in:
parent
aa84a7ff2b
commit
783f597955
5 changed files with 19 additions and 5 deletions
|
@ -263,7 +263,9 @@ def run(subcommand: str,
|
|||
@enforce_types
|
||||
def init(force: bool=False, out_dir: Path=OUTPUT_DIR) -> None:
|
||||
"""Initialize a new ArchiveBox collection in the current directory"""
|
||||
|
||||
from core.models import Snapshot
|
||||
|
||||
Path(out_dir).mkdir(exist_ok=True)
|
||||
is_empty = not len(set(os.listdir(out_dir)) - ALLOWED_IN_OUTPUT_DIR)
|
||||
|
||||
|
|
|
@ -47,8 +47,8 @@ def atomic_write(path: Union[Path, str], contents: Union[dict, str, bytes], over
|
|||
f.write(contents)
|
||||
except OSError as e:
|
||||
print(f"[X] OSError: Failed to write {path} with fcntl.F_FULLFSYNC. ({e})")
|
||||
print(" For data integrity, ArchiveBox requires a filesystem that supports atomic writes.")
|
||||
print(" Filesystems and network drives that don't implement FSYNC are incompatible and require workarounds.")
|
||||
print(" You can store the archive/ subfolder on a hard drive or network share that doesn't support support syncronous writes,")
|
||||
print(" but the main folder containing the index.sqlite3 and ArchiveBox.conf files must be on a filesystem that supports FSYNC.")
|
||||
raise SystemExit(1)
|
||||
os.chmod(path, int(OUTPUT_PERMISSIONS, base=8))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue