aboutsummaryrefslogtreecommitdiffstats
path: root/lib/stdlib/src/erl_tar.erl
AgeCommit message (Collapse)Author
2017-05-29erl_tar: Fix handling of date and timeBjörn Gustavsson
Since aa0c4b0df7cdc, erl_tar would write the local time (instead of the POSIX time) into the tar header for the archived files. When extracting the tar file, the extracted file could be set to a future time (depending on the time zone). We could do a minimal fix, but this seems to be a good time to rewrite the time handling to use the new features that allow file info to be read and written in the POSIX time format. First reported here: https://github.com/erlang/rebar3/issues/1554
2017-04-13erl_tar: Handle leading slashes and directory traversal attacksBjörn Gustavsson
2017-03-10erl_tar: Close files after reading from a tar fileBjörn Gustavsson
Also let the test suite verify that all files that are opened will be closed before the end of each test case. aa0c4b0df7cdc7 introduced the file descriptor leak.
2017-02-16Update erl_tar to support PAX format, etc.Paul Schoenfelder
This commit introduces the following key changes: - Support for reading tar archives in formats currently in common use, such as v7, STAR, USTAR, PAX, and GNU tar's extensions to the STAR/USTAR format. - Support for writing PAX archives, only when necessary, using USTAR when possible for greater portability. These changes result in lifting of some prior restrictions: - Support for reading archives produced by modern tar implementations when other restrictions described below are present. - Support for filenames which exceed 100 bytes in length, or paths which exceed 255 bytes (see USTAR format specification for more details on this restriction). - Support for filenames of arbitrary length - Support for unicode metadata (the previous behaviour of erl_tar was actually violating the spec, by writing unicode-encoded data to fields which are defined to be 7-bit ASCII, even though this technically worked when using erl_tar at source and destination, it may not have worked with other tar utilities, and this implementation now conforms to the spec). - Support for uid/gid values which cannot be converted to octal integers.
2016-03-15update copyright-yearHenrik Nord
2015-06-18Change license text to APLv2Bruce Yinhe
2015-03-20Replace usage of erlang:now() with usage of new APIRickard Green
2014-12-01ssh: Implements and tests erl_tar read from remote host.Hans Nilsson
2014-11-18erl_tar: Extend api to define own storage media access functions.Hans Nilsson
The reason for this is a requirement on enabling ssh_sftp to write a tar file on the server. This new api function is used by ssh_sftp:open_tar/3,4.
2014-05-08Correct end of tape markerBjörn Gustavsson
The POSIX standard for tar says that there must be at least two 512-bytes zero blocks at the end of the tar archive file. Our implementation would only emit a single 512-byte zero block if the size of the last file was in the range 18*512 through 19*512-1 (modulo 20*512). GNU tar would correctly unpack such tar archive file, but would emit a warning: tar: A lone zero block at 20
2014-05-08Support path names with characters outside the US ASCII rangeBjörn Gustavsson
2013-10-14Merge branch 'maint'Fredrik Gustafsson
2013-09-12Remove ^L characters hidden randomly in the code. Not those used in text ↵Pierre Fenoll
files as delimiters. While working on a tool that processes Erlang code and testing it against this repo, I found out about those little sneaky 0xff. I thought it may be of help to other people build such tools to remove non-conforming-to-standard characters.
2013-05-06Fix unmatched_returns warnings in STDLIB and KernelHans Bolinder
2013-01-25Update copyright yearsBjörn-Egil Dahlberg
2013-01-25Make adjustments for UnicodeHans Bolinder
2011-06-14Allow erl_tar to create directories inside directory with no read accessSiri Hansen
erl_tar:extract earlier failed when unpacking inside a directory which had some parent directory to which the user had no read access. This is corrected.
2009-11-20The R13B03 release.OTP_R13B03Erlang/OTP