parent
79c128320e
commit
e5c88b8871
|
@ -3,7 +3,7 @@ project(caesiumclt)
|
||||||
|
|
||||||
# The version number.
|
# The version number.
|
||||||
set(VERSION_MAJOR 0)
|
set(VERSION_MAJOR 0)
|
||||||
set(VERSION_MINOR 14)
|
set(VERSION_MINOR 15)
|
||||||
set(VERSION_PATCH 0)
|
set(VERSION_PATCH 0)
|
||||||
|
|
||||||
configure_file(
|
configure_file(
|
||||||
|
|
4
config.h
4
config.h
|
@ -1,4 +0,0 @@
|
||||||
#define VERSION_MAJOR 0
|
|
||||||
#define VERSION_MINOR 14
|
|
||||||
#define VERSION_PATCH 0
|
|
||||||
|
|
|
@ -236,6 +236,7 @@ int start_compression(cclt_options *options, cs_image_pars *parameters) {
|
||||||
char *original_output_full_path = NULL;
|
char *original_output_full_path = NULL;
|
||||||
bool overwriting = false;
|
bool overwriting = false;
|
||||||
off_t file_size = 0;
|
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 we don't need to keep the structure, we put all the files in one folder by just the filename
|
||||||
if (!options->keep_structure) {
|
if (!options->keep_structure) {
|
||||||
output_full_path = malloc((strlen(filename) + strlen(options->output_folder) + 1) * sizeof(char));
|
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
|
//Prevent compression if running in dry mode
|
||||||
if (!options->dry_run) {
|
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++;
|
compressed_files++;
|
||||||
output_file_size = get_file_size(output_full_path);
|
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,
|
human_output_size,
|
||||||
((float) output_file_size - input_file_size) * 100 / input_file_size);
|
((float) output_file_size - input_file_size) * 100 / input_file_size);
|
||||||
} else {
|
} 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]);
|
options->input_total_size -= get_file_size(options->input_files[i]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue