summaryrefslogtreecommitdiffstats
path: root/zupdate.cc
diff options
context:
space:
mode:
authorDaniel Baumann <mail@daniel-baumann.ch>2015-11-08 04:37:59 +0000
committerDaniel Baumann <mail@daniel-baumann.ch>2015-11-08 04:37:59 +0000
commit5a8338a2537d1aca007fee7d5c1927b3a83c2da3 (patch)
tree36348dba6840228936b5152149ea57802a0bc81b /zupdate.cc
parentAdding debian version 1.3~pre1-1. (diff)
downloadzutils-5a8338a2537d1aca007fee7d5c1927b3a83c2da3.tar.xz
zutils-5a8338a2537d1aca007fee7d5c1927b3a83c2da3.zip
Merging upstream version 1.3~pre2.
Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
Diffstat (limited to 'zupdate.cc')
-rw-r--r--zupdate.cc7
1 files changed, 3 insertions, 4 deletions
diff --git a/zupdate.cc b/zupdate.cc
index cf488da..2b3244b 100644
--- a/zupdate.cc
+++ b/zupdate.cc
@@ -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 )