20 Commits

Author SHA1 Message Date
Krystian Wojcicki
a2d7d2b2a1 Fixing resource cleanup in minitar 2019-11-22 22:42:43 -05:00
George Hartzell
e2c01a16b7 Fix scoping error with "disk" variable
The variable named 'disk' inside the loop was hiding the variable named
'disk' at the outer level.  The outer variable was never used, get rid
of it.

Move the call to archive_read_disk_set_standard_lookup(disk) inside the
loop so that it Does What It Should.
2016-09-29 14:30:44 -07:00
Tim Kientzle
a74d6220e4 Issue 690: Document the possible need for -lacl on some Linux systems 2016-04-27 23:20:40 -07:00
prehistoric-penguin
4e8696678c fix missing archive_write_close for write object
fix missing archive_write_close and archive_write_free
2016-04-11 17:29:05 +08:00
Paul Barker
e3d9dfebdf Cleanup error message printing in minitar example
* An error message should not be printed if EOF is reached in copy_data. However
  an error message should be printed if any other error is encountered.

* A newline should be printed in extract if an error message was printed.

* If a file name is printed in extract (verbose operation) it should be followed
  by a space incase there is an error message.

Signed-off-by: Paul Barker <paul@paulbarker.me.uk>
2015-09-25 17:28:14 +01:00
Jean-Yves Migeon
a79624032e Bug fix (segfault): check filename against NULL in case we want
the output to go to stdout.
2013-09-05 15:27:52 +02:00
Martin Pitt
7da8d57684 Set offset to correct data type.
Fixes #282
Signed-off-by: Andres Mejia <amejia004@gmail.com>
2013-02-09 14:10:41 -05:00
Martin Pitt
b8bb251083 Use correct define for libarchive version number in archive.h.
Signed-off-by: Andres Mejia <amejia004@gmail.com>
2013-02-09 14:10:41 -05:00
Benjamin Drung
453f819252 Set a default error message if message passed in is NULL.
Signed-off-by: Andres Mejia <amejia004@gmail.com>
2013-02-09 14:10:41 -05:00
Benjamin Drung
d19d180efd Fix build failure of example program because of __FBSDID define.
Fixes #283
Signed-off-by: Andres Mejia <amejia004@gmail.com>
2013-02-09 14:10:30 -05:00
Michihiro NAKAJIMA
9ddee32b91 Issue 269. Stop using deprecated functions in example source code. 2012-12-02 21:34:24 +09:00
Tim Kientzle
77ae35f31a Make untar.c build correctly with libarchive 3.0.
SVN-Revision: 3719
2011-09-18 17:50:00 -04:00
Roman Neuhauser
aa4ef729ec client and example programs use archive_read_support_filter_*()
the archive_read_support_compression_* -> archive_read_support_filter
change should now be complete.

SVN-Revision: 3115
2011-03-28 19:18:57 -04:00
Tim Kientzle
2c59db641c Rework minitar example to use archive_read_disk directory
traversal instead of a local copy of tree.c

SVN-Revision: 2526
2010-07-03 22:38:06 -04:00
Tim Kientzle
9890b31ffd Rename archive_read_finish to archive_read_free and
archive_write_finish to archive_write_free.  Update all clients,
tests, and documentation to use the new names exclusively.  (Though
I've not yet run a global search-and-replace against the Wiki.  I'll
do that shortly.)

I've preserved the old names as aliases, scheduled to be removed with
libarchive 4.x, so there is no immediate impact to existing code from
this change.

SVN-Revision: 1891
2010-02-08 02:18:22 -05:00
Tim Kientzle
0cc48eabda Another fix, thanks to Daniel Mack.
SVN-Revision: 1409
2009-08-31 11:54:42 -04:00
Tim Kientzle
8fe57b0b57 Minor updates to minitar: Support compress on write, add full
user/group lookups by default and an option to suppress them.  With
all of the suppression macros, this compiles to about the same size as
does examples/untar.c.

SVN-Revision: 1398
2009-08-29 00:33:18 -04:00
Tim Kientzle
ddf552bb91 Fix a handful of bugs in untar.c and significantly extend the opening
commentary, which hasn't really been updated since 2006 or so.  In
particular, I went back and rechecked the sizes on modern FreeBSD and
found that things have bloated quite a bit: statically compiled,
untar.c is now about 25% larger than hello.c, where it used to be
almost 25% smaller.

SVN-Revision: 1396
2009-08-28 23:42:55 -04:00
Tim Kientzle
e3b237261b Comment tweaks; make it a little more obvious the difference
between examples/untar.c and contrib/untar.c.  I should
probably rename one of these.

SVN-Revision: 1144
2009-05-30 03:38:01 -04:00
Tim Kientzle
6d04d9655f Include 'examples' and 'contrib' dirs from libarchive portable distro.
SVN-Revision: 8
2008-04-30 18:11:33 -04:00