summaryrefslogtreecommitdiffstats
path: root/split.cc
diff options
context:
space:
mode:
authorDaniel Baumann <mail@daniel-baumann.ch>2015-11-07 11:41:34 +0000
committerDaniel Baumann <mail@daniel-baumann.ch>2015-11-07 11:41:34 +0000
commit9babb5bc11dd99942f6077669fa806d83ef146ff (patch)
tree5f2af8fceb7f878989259f6b65c6483c52891ec9 /split.cc
parentAdding upstream version 1.14. (diff)
downloadlziprecover-9babb5bc11dd99942f6077669fa806d83ef146ff.tar.xz
lziprecover-9babb5bc11dd99942f6077669fa806d83ef146ff.zip
Adding upstream version 1.15~pre1.upstream/1.15_pre1
Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
Diffstat (limited to 'split.cc')
-rw-r--r--split.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/split.cc b/split.cc
index ac7627d..bec8a26 100644
--- a/split.cc
+++ b/split.cc
@@ -90,7 +90,7 @@ int do_split_file( const std::string & input_filename, uint8_t * & base_buffer,
const int verbosity, const bool force )
{
const int hsize = File_header::size;
- const int tsize = File_trailer::size();
+ const int tsize = File_trailer::size;
const int buffer_size = 65536;
const int base_buffer_size = tsize + buffer_size + hsize;
base_buffer = new uint8_t[base_buffer_size];
@@ -99,7 +99,8 @@ int do_split_file( const std::string & input_filename, uint8_t * & base_buffer,
struct stat in_stats;
const int infd = open_instream( input_filename, &in_stats, true, true );
if( infd < 0 ) return 1;
- File_index file_index( infd );
+ const File_index file_index( infd );
+ if( file_index.retval() != 0 ) show_error( file_index.error().c_str() );
const int max_members = ( file_index.retval() ? 999999 : file_index.members() );
int max_digits = 1;
for( int i = max_members; i >= 10; i /= 10 ) ++max_digits;