X-Git-Url: https://wimlib.net/git/?p=wimlib;a=blobdiff_plain;f=programs%2Fimagex.c;h=ed0f24dce3bc853c4f3c60151152ae74c051138a;hp=e7ebc2eb33e54b80ae54c237a25cde213daacf88;hb=5ed5a1ef610700e463abd0c07aed377cce5eef47;hpb=4016a9dba036f4d2eca0253c99370e6647a9ccb6 diff --git a/programs/imagex.c b/programs/imagex.c index e7ebc2eb..ed0f24dc 100644 --- a/programs/imagex.c +++ b/programs/imagex.c @@ -280,6 +280,21 @@ static off_t file_get_size(const char *filename) return (off_t)-1; } +static const char *default_capture_config = +"[ExclusionList]\n" +"\\$ntfs.log\n" +"\\hiberfil.sys\n" +"\\pagefile.sys\n" +"\\System Volume Information\n" +"\\RECYCLER\n" +"\\Windows\\CSC\n" +"\n" +"[CompressionExclusionList]\n" +"*.mp3\n" +"*.zip\n" +"*.cab\n" +"\\WINDOWS\\inf\\*.pnf\n"; + static char *file_get_contents(const char *filename, size_t *len_ret) { struct stat stbuf; @@ -769,8 +784,10 @@ static int imagex_capture_or_append(int argc, const char **argv) } } - ret = wimlib_add_image(w, source, name, config_str, config_len, - add_image_flags, imagex_progress_func); + ret = wimlib_add_image(w, source, name, + config_str ? config_str : default_capture_config, + config_len, add_image_flags, + imagex_progress_func); if (ret != 0) goto out; @@ -1033,7 +1050,6 @@ static int imagex_export(int argc, const char **argv) ret = -1; goto out; } - compression_type = dest_ctype; } else { wim_is_new = true; /* dest_wimfile is not an existing file, so create a new WIM. */