Using libcaesium 0.5.0
This commit is contained in:
Matteo Paonessa 2019-12-23 19:10:44 +01:00
parent 79c128320e
commit e5c88b8871
3 changed files with 4 additions and 6 deletions

View File

@ -3,7 +3,7 @@ project(caesiumclt)
# The version number.
set(VERSION_MAJOR 0)
set(VERSION_MINOR 14)
set(VERSION_MINOR 15)
set(VERSION_PATCH 0)
configure_file(

View File

@ -1,4 +0,0 @@
#define VERSION_MAJOR 0
#define VERSION_MINOR 14
#define VERSION_PATCH 0

View File

@ -236,6 +236,7 @@ int start_compression(cclt_options *options, cs_image_pars *parameters) {
char *original_output_full_path = NULL;
bool overwriting = false;
off_t file_size = 0;
int compression_error_code = 0;
//If we don't need to keep the structure, we put all the files in one folder by just the filename
if (!options->keep_structure) {
output_full_path = malloc((strlen(filename) + strlen(options->output_folder) + 1) * sizeof(char));
@ -306,7 +307,7 @@ int start_compression(cclt_options *options, cs_image_pars *parameters) {
//Prevent compression if running in dry mode
if (!options->dry_run) {
if (cs_compress(options->input_files[i], output_full_path, parameters)) {
if (cs_compress(options->input_files[i], output_full_path, parameters, &compression_error_code)) {
compressed_files++;
output_file_size = get_file_size(output_full_path);
@ -325,6 +326,7 @@ int start_compression(cclt_options *options, cs_image_pars *parameters) {
human_output_size,
((float) output_file_size - input_file_size) * 100 / input_file_size);
} else {
print_to_console(stderr, verbose, "Compression failed with error %d\n", compression_error_code);
options->input_total_size -= get_file_size(options->input_files[i]);
}
}