summaryrefslogtreecommitdiffstats
path: root/delete.cc
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2019-10-13 09:09:52 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2019-10-13 09:10:01 +0000
commit3edd69686171314709676dafc694fd6ba2533def (patch)
tree7e2b73bcedbc50eefbcb380560454577a5c796aa /delete.cc
parentReleasing debian version 0.15-3. (diff)
downloadtarlz-3edd69686171314709676dafc694fd6ba2533def.tar.xz
tarlz-3edd69686171314709676dafc694fd6ba2533def.zip
Merging upstream version 0.16.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'delete.cc')
-rw-r--r--delete.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/delete.cc b/delete.cc
index 2e87833..234864c 100644
--- a/delete.cc
+++ b/delete.cc
@@ -75,10 +75,10 @@ int tail_copy( const char * const archive_namep, const Arg_parser & parser,
if( ostream_pos < 0 ) { show_error( "Seek error", errno ); retval = 1; }
else if( ostream_pos > 0 && ostream_pos < lzip_index.file_size() )
{
- int result;
- do result = ftruncate( outfd, ostream_pos );
- while( result != 0 && errno == EINTR );
- if( result != 0 )
+ int ret;
+ do ret = ftruncate( outfd, ostream_pos );
+ while( ret != 0 && errno == EINTR );
+ if( ret != 0 || lseek( outfd, 0, SEEK_END ) != ostream_pos )
{
show_file_error( archive_namep, "Can't truncate archive", errno );
if( retval < 1 ) retval = 1;