mirror of
https://github.com/walles/moar.git
synced 2024-10-05 16:07:54 +03:00
Decompress .tgz files befire "showing" them
These files are archives, which moar is not designed to view. However, for tar files containing text, decompressing them before showing them will make at least text files in the archive readable. Fixes #194.
This commit is contained in:
parent
59270d6f8c
commit
7fd69ad308
@ -21,6 +21,10 @@ func ZOpen(filename string) (io.ReadCloser, error) {
|
||||
case strings.HasSuffix(filename, ".gz"):
|
||||
return gzip.NewReader(file)
|
||||
|
||||
// Ref: https://github.com/walles/moar/issues/194
|
||||
case strings.HasSuffix(filename, ".tgz"):
|
||||
return gzip.NewReader(file)
|
||||
|
||||
case strings.HasSuffix(filename, ".bz2"):
|
||||
return struct {
|
||||
io.Reader
|
||||
|
Loading…
Reference in New Issue
Block a user