From 9f4d9b49a3e0bf5c62193a1c2c896d0c9df5f686 Mon Sep 17 00:00:00 2001 From: Eric Biggers Date: Thu, 23 Aug 2012 20:43:23 -0500 Subject: [PATCH] Default to XPRESS compression --- programs/imagex.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/programs/imagex.c b/programs/imagex.c index 5a068528..998378da 100644 --- a/programs/imagex.c +++ b/programs/imagex.c @@ -278,7 +278,7 @@ static int verify_image_exists_and_is_single(int image) static int get_compression_type(const char *optarg) { if (!optarg) - return WIM_COMPRESSION_TYPE_LZX; + return WIM_COMPRESSION_TYPE_XPRESS; if (strcasecmp(optarg, "maximum") == 0 || strcasecmp(optarg, "lzx") == 0) return WIM_COMPRESSION_TYPE_LZX; else if (strcasecmp(optarg, "fast") == 0 || strcasecmp(optarg, "xpress") == 0) @@ -451,7 +451,7 @@ static int imagex_capture(int argc, const char **argv) int c; int add_image_flags = 0; int write_flags = WIMLIB_WRITE_FLAG_SHOW_PROGRESS; - int compression_type = WIM_COMPRESSION_TYPE_NONE; + int compression_type = WIM_COMPRESSION_TYPE_XPRESS; const char *flags_element = NULL; const char *dir; const char *wimfile; @@ -653,7 +653,7 @@ static int imagex_export(int argc, const char **argv) int open_flags = WIMLIB_OPEN_FLAG_SHOW_PROGRESS; int export_flags = 0; int write_flags = WIMLIB_WRITE_FLAG_SHOW_PROGRESS; - int compression_type = WIM_COMPRESSION_TYPE_NONE; + int compression_type = WIM_COMPRESSION_TYPE_XPRESS; bool compression_type_specified = false; const char *src_wimfile; const char *src_image_num_or_name; @@ -708,7 +708,7 @@ static int imagex_export(int argc, const char **argv) if (stat(dest_wimfile, &stbuf) == 0) { wim_is_new = false; /* Destination file exists. */ - if (!S_ISREG(stbuf.st_mode)) { + if (!S_ISREG(stbuf.st_mode) && !S_ISLNK(stbuf.st_mode)) { imagex_error("`%s' is not a regular file", dest_wimfile); goto done; -- 2.43.0