diff options
Diffstat (limited to '')
-rw-r--r-- | zupdate.cc | 7 |
1 files changed, 3 insertions, 4 deletions
@@ -136,14 +136,13 @@ struct { const char * from; const char * to; int format_index; } const { ".txz", ".tar", fmt_xz }, { 0, 0, -1 } }; -int disable_xz = -1; // tri-state bool - // Returns 0 for success, -1 for file skipped, 1 for error. int zupdate_file( const std::string & name, const char * const lzip_name, const std::vector< std::string > & lzip_args2, const bool force, const bool keep_input_files ) { + static int disable_xz = -1; // tri-state bool int format_index = -1; std::string dname; // decompressed_name @@ -167,7 +166,7 @@ int zupdate_file( const std::string & name, const char * const lzip_name, } } const char * const compressor_name = get_compressor_name( format_index ); - if( !compressor_name || !compressor_name[0] ) + if( !compressor_name ) { if( verbosity >= 2 ) std::fprintf( stderr, "%s: Unknown extension in file name '%s' -- ignored.\n", @@ -384,7 +383,7 @@ int main( const int argc, const char * const argv[] ) #endif const char * const lzip_name = get_compressor_name( fmt_lz ); - if( !lzip_name || !lzip_name[0] ) + if( !lzip_name ) { show_error( "Missing name of compressor for lzip format." ); return 1; } for( ; argind < parser.arguments(); ++argind ) |