Problems reading tar contents - cannot open files or wrong content shown
Small description Nested archives, e.g., a tar inside a tar, or a .csv.gz inside a tar.gz cannot be opened.
Data to reproduce n/a see below
Steps to reproduce
- Cannot open csv.gz inside a tar
printf 'a,b,c\n1,2,3\n' | gzip > data.csv.gz
tar cf outside.tar data.csv.gz
vd outside.tarNow press enter to open data.csv.gz inside outside.tar and it shows binary garbage.
- Cannot open tar inside tar:
printf 'a,b,c\n1,2,3\n' | gzip > data.csv.gz
tar cf inside.tar data.csv.gz
tar cf outside.tar inside.tar
rm data.csv.gz inside.tar
vd outside.tarNow press enter to open inside.tar inside outside.tar and it shows a blank sheet.
- Show wrong content inside tar
printf 'a,b,c\n1,2,3\n' | gzip > data.csv.gz
tar cf inside.tar data.csv.gz
tar cf outside.tar inside.tar
printf 'DECOY,DECOY\n9,9\n' | gzip > decoy.csv.gz
tar cf inside.tar decoy.csv.gz
rm data.csv.gz decoy.csv.gz
vd outside.tarNow press enter to open the inside.tar from inside the outside.tar. It shows its content as decoy.csv.gz while it should have shown data.csv.gz.
Expected result Explained above
Actual result with screenshot Explained above.
Configuration
Does this issue reproduce without any plugins or configuration (using the
-NCLI flag)? -> YESDoes this issue reproduce with either the latest release, or with the develop branch? -> YES
Additional context
What platform and version are you using (Linux, MacOS, Windows)? -> Linux
Which version of Python? -> 3.14.4
Which terminal are you using (for display and input issues)? - n/a
Source: saulpw/visidata