1
0
mirror of https://github.com/webrecorder/pywb.git synced 2025-03-15 00:03:28 +01:00

That's the thing: we have file systems with transparent compression nowadays (and to think this started with Stacker on MS-DOS!), so it makes sense to use **uncompressed** WARC files on a BTRFS or NTFS with it activated. This commit deactivates the WARCIO gzip support when the filename **does not** ends with .gz, allowing the user to use these filesystems to reach the compression he wants without having to deal with uncompressing the WARC on use.

for https://github.com/webrecorder/pywb/issues/915
This commit is contained in:
Lisias T 2024-07-14 04:28:20 -03:00
parent 97fffe3a34
commit cedbcb819f
No known key found for this signature in database
GPG Key ID: CF287A3332253B2A

View File

@ -32,6 +32,7 @@ class MultiFileWARCWriter(BaseWARCWriter):
self.dedup_index = kwargs.get('dedup_index')
self.dedup_by_url = kwargs.get('dedup_by_url')
self.filename_template = filename_template
self.gzip = self.filename_template.endswith(".gz")
self.max_size = max_size
if max_idle_secs > 0:
self.max_idle_time = datetime.timedelta(seconds=max_idle_secs)