1
0
Fork 0

Adding upstream version 0.25.

Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
Daniel Baumann 2025-02-17 21:27:24 +01:00
parent 4f5d0de2b2
commit 8853aa3bf2
Signed by: daniel
GPG key ID: FBB4F0E80A80222F
33 changed files with 317 additions and 280 deletions

View file

@ -1,5 +1,5 @@
/* Tarlz - Archiver with multimember lzip compression
Copyright (C) 2013-2023 Antonio Diaz Diaz.
Copyright (C) 2013-2024 Antonio Diaz Diaz.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@ -29,6 +29,8 @@
#if !defined __FreeBSD__ && !defined __OpenBSD__ && !defined __NetBSD__ && \
!defined __DragonFly__ && !defined __APPLE__ && !defined __OS2__
#include <sys/sysmacros.h> // for major, minor, makedev
#else
#include <sys/types.h> // for major, minor, makedev
#endif
#include <lzlib.h>
@ -258,10 +260,10 @@ Trival skip_member_lz( Archive_reader_i & ar, Packet_courier & courier,
Trival compare_member_lz( const Cl_options & cl_opts,
Archive_reader_i & ar, Packet_courier & courier,
const Extended & extended, const Tar_header header,
Resizable_buffer & rbuf, const long member_id,
const int worker_id )
Archive_reader_i & ar, Packet_courier & courier,
const Extended & extended, const Tar_header header,
Resizable_buffer & rbuf, const long member_id,
const int worker_id )
{
if( verbosity < 1 ) rbuf()[0] = 0;
else if( !format_member_name( extended, header, rbuf, verbosity > 1 ) )
@ -357,7 +359,7 @@ Trival extract_member_lz( const Cl_options & cl_opts,
/* Remove file before extraction to prevent following links.
Don't remove an empty dir because other thread may need it. */
if( typeflag != tf_directory ) std::remove( filename );
if( !make_path( filename ) )
if( !make_dirs( filename ) )
{
if( format_file_error( rbuf, filename, intdir_msg, errno ) &&
!courier.collect_packet( member_id, worker_id, rbuf(), Packet::diag ) )
@ -451,7 +453,7 @@ Trival extract_member_lz( const Cl_options & cl_opts,
chown( filename, extended.get_uid(), extended.get_gid() ) != 0 ) )
{
if( outfd >= 0 ) mode &= ~( S_ISUID | S_ISGID | S_ISVTX );
// chown will in many cases return with EPERM, which can be safely ignored.
// chown in many cases returns with EPERM, which can be safely ignored.
if( errno != EPERM && errno != EINVAL )
{
if( format_file_error( rbuf, filename, chown_msg, errno ) &&