Displaying directory tree sizes with -update and -update_r
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
|
||||
/* xorriso - creates, loads, manipulates and burns ISO 9660 filesystem images.
|
||||
|
||||
Copyright 2007-2014 Thomas Schmitt, <scdbackup@gmx.net>
|
||||
Copyright 2007-2019 Thomas Schmitt, <scdbackup@gmx.net>
|
||||
|
||||
Provided under GPL version 2 or later.
|
||||
|
||||
@@ -796,7 +796,7 @@ int Xorriso_update_interpreter(struct XorrisO *xorriso,
|
||||
int split_count= 0;
|
||||
char *part_path= NULL, *part_name;
|
||||
int partno, total_parts, new_total_parts, added_overwrote= 0;
|
||||
off_t offset, bytes, total_bytes, disk_size, first_bytes;
|
||||
off_t offset, bytes, total_bytes, disk_size, first_bytes, du_size;
|
||||
|
||||
if((compare_result&3)==3) {
|
||||
sprintf(xorriso->info_text, "Missing on disk and in ISO: disk_path ");
|
||||
@@ -1015,6 +1015,15 @@ overwrite:;
|
||||
xorriso->info_text + strlen(xorriso->info_text), 5, 1e4,
|
||||
1 | 2);
|
||||
strcat(xorriso->info_text, ")");
|
||||
} else if (ret == 0 && S_ISDIR(stbuf.st_mode)) {
|
||||
ret= Xorriso_get_dus(xorriso, iso_rr_path, &du_size, (off_t) 0, 0);
|
||||
if(ret > 0 && du_size > 0) {
|
||||
strcat(xorriso->info_text, " (");
|
||||
Sfile_scale((double) du_size,
|
||||
xorriso->info_text + strlen(xorriso->info_text), 5, 1e4,
|
||||
1 | 2);
|
||||
strcat(xorriso->info_text, ")");
|
||||
}
|
||||
}
|
||||
}
|
||||
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "UPDATE", 0);
|
||||
|
Reference in New Issue
Block a user