diff options
author | Daniel Baumann <mail@daniel-baumann.ch> | 2015-11-07 11:49:54 +0000 |
---|---|---|
committer | Daniel Baumann <mail@daniel-baumann.ch> | 2015-11-07 11:49:54 +0000 |
commit | ea9b55f6d0c2eb30dffe1a4815d3696d77888b6a (patch) | |
tree | 95976219fe7545aeb60f2f8894742193a9927b4b /main.cc | |
parent | Adding upstream version 1.16. (diff) | |
download | lziprecover-ea9b55f6d0c2eb30dffe1a4815d3696d77888b6a.tar.xz lziprecover-ea9b55f6d0c2eb30dffe1a4815d3696d77888b6a.zip |
Adding upstream version 1.17~pre1.upstream/1.17_pre1
Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
Diffstat (limited to 'main.cc')
-rw-r--r-- | main.cc | 15 |
1 files changed, 12 insertions, 3 deletions
@@ -92,7 +92,14 @@ bool delete_output_on_interrupt = false; void show_help() { std::printf( "%s - Data recovery tool and decompressor for the lzip format.\n", Program_name ); - std::printf( "\nUsage: %s [options] [files]\n", invocation_name ); + std::printf( "Lziprecover can repair perfectly most files with small errors (up to one\n" + "single-byte error per member), without the need of any extra redundance\n" + "at all. Losing an entire archive just because of a corrupt byte near the\n" + "beginning is a thing of the past.\n" + "Lziprecover can also produce a correct file by merging the good parts of\n" + "two or more damaged copies, extract data from damaged files, decompress\n" + "files and test integrity of files.\n" + "\nUsage: %s [options] [files]\n", invocation_name ); std::printf( "\nOptions:\n" " -h, --help display this help and exit\n" " -V, --version output version information and exit\n" @@ -304,10 +311,12 @@ void close_and_set_permissions( const struct stat * const in_statsp ) std::string insert_fixed( std::string name ) { - if( name.size() > 4 && name.compare( name.size() - 4, 4, ".tlz" ) == 0 ) - name.insert( name.size() - 4, "_fixed" ); + if( name.size() > 7 && name.compare( name.size() - 7, 7, ".tar.lz" ) == 0 ) + name.insert( name.size() - 7, "_fixed" ); else if( name.size() > 3 && name.compare( name.size() - 3, 3, ".lz" ) == 0 ) name.insert( name.size() - 3, "_fixed" ); + else if( name.size() > 4 && name.compare( name.size() - 4, 4, ".tlz" ) == 0 ) + name.insert( name.size() - 4, "_fixed" ); else name += "_fixed.lz"; return name; } |