From 4372cb6eecd32778830c8c531fb7873ac786c0b8 Mon Sep 17 00:00:00 2001 From: Nick Sweeting Date: Thu, 12 Nov 2020 14:55:21 -0500 Subject: [PATCH] stop execution entirely when atomic_write is unsupported --- archivebox/system.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/archivebox/system.py b/archivebox/system.py index 2caf58e1..b27c5e46 100644 --- a/archivebox/system.py +++ b/archivebox/system.py @@ -48,7 +48,8 @@ def atomic_write(path: Union[Path, str], contents: Union[dict, str, bytes], over 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(" Some filesystems and network drives don't implement FSYNC, and require workarounds.") + print(" Filesystems and network drives that don't implement FSYNC are incompatible and require workarounds.") + raise SystemExit(1) os.chmod(path, int(OUTPUT_PERMISSIONS, base=8)) @enforce_types