Skip to content

Commit

Permalink
That's the thing: we have file systems with transparent compression n…
Browse files Browse the repository at this point in the history
…owadays (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 webrecorder#915
  • Loading branch information
Lisias committed Aug 19, 2024
1 parent 97fffe3 commit cedbcb8
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions pywb/recorder/multifilewarcwriter.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ def __init__(self, dir_template, filename_template=None, max_size=0,
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)
Expand Down

0 comments on commit cedbcb8

Please # to comment.