summaryrefslogtreecommitdiff
path: root/sys/src/cmd/tar.c
AgeCommit message (Collapse)Author
2019-11-15Parse global pax header in the right place.Ori Bernstein
2019-11-14Add pax extended header support to tar.Ori Bernstein
Support for 'path=', 'uname=', 'gname=', 'size=', and 'atime=' pax headers is useful. Others are ignored, possibly with a warning. We were running into missing support with the 'go' extraction. At the same time, this cleans up the way that we handle paths, getting rid of static buffers with hidden space at the front.
2019-11-05Fix directory heuristic for long file names.Ori Bernstein
Tar specifies that a filename ending with '/' is a directory. We were incorrectly looking at the short name. This meant that when we have long filenames with a '/' at the 100th character, we would decide it was a directory. This change uses the long name when deciding the size for extraction, and trusts the header size when just skipping forward in the stream.
2019-11-02tar: fix memory corruption in extract1 (thanks petter)cinap_lenrek
extract1() expects two extra bytes to be avilabe before fname buffer so it can prepend ./ before the name. this used to be the case with name(), but was violated when long name support was added and getname() was used in place of name() which did not reserve the 2 extra bytes. this change reserves two extra bytes in the getname()'s static buffer and also removes the extra copy as name() already makes a copy.
2016-11-17tar: remove unused variableftrvxmtrx
2015-09-08tar: remove unneccesary { }cinap_lenrek
2015-09-08tar: make z flag work, even when no file name was provided (thanks aiju)cinap_lenrek
tar used to infer compression type from the filenames extension, but when no file name is given (stdin/stdout), the -z flag was ignored and no compression filter applied. this changes tar to assume the default gzip compression method when z is given and no file name is specified.
2015-05-19tar, tarfs: implement longname supportcinap_lenrek
this allows extracting tar archives that use longnames extension, where the real filename is stored in a special entry with linkflag == 'L' before the file entry. also skip longlink entries with linkflag == 'K'.
2011-03-30Import sources from 2011-03-30 iso image - libTaru Karttunen
2011-03-30Import sources from 2011-03-30 iso imageTaru Karttunen