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:
parent
97fffe3a34
commit
cedbcb819f
@ -32,6 +32,7 @@ class MultiFileWARCWriter(BaseWARCWriter):
|
|||||||
self.dedup_index = kwargs.get('dedup_index')
|
self.dedup_index = kwargs.get('dedup_index')
|
||||||
self.dedup_by_url = kwargs.get('dedup_by_url')
|
self.dedup_by_url = kwargs.get('dedup_by_url')
|
||||||
self.filename_template = filename_template
|
self.filename_template = filename_template
|
||||||
|
self.gzip = self.filename_template.endswith(".gz")
|
||||||
self.max_size = max_size
|
self.max_size = max_size
|
||||||
if max_idle_secs > 0:
|
if max_idle_secs > 0:
|
||||||
self.max_idle_time = datetime.timedelta(seconds=max_idle_secs)
|
self.max_idle_time = datetime.timedelta(seconds=max_idle_secs)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user