]> wimlib.net Git - wimlib/commitdiff
wimexport: allow exporting to archive directly on block device
authorEric Biggers <ebiggers3@gmail.com>
Tue, 16 Aug 2016 06:55:52 +0000 (23:55 -0700)
committerEric Biggers <ebiggers3@gmail.com>
Tue, 16 Aug 2016 06:55:52 +0000 (23:55 -0700)
programs/imagex.c

index 1eb8489b03888f109ba5d35bb4479cbcda8fb07d..c1b064dc37c723a7d60da93901d3891fbeb0b772 100644 (file)
@@ -2976,9 +2976,9 @@ imagex_export(int argc, tchar **argv, int cmd)
                wim_is_new = false;
                /* Destination file exists. */
 
-               if (!S_ISREG(stbuf.st_mode)) {
-                       imagex_error(T("\"%"TS"\" is not a regular file"),
-                                    dest_wimfile);
+               if (!S_ISREG(stbuf.st_mode) && !S_ISBLK(stbuf.st_mode)) {
+                       imagex_error(T("\"%"TS"\" is not a regular file "
+                                      "or block device"), dest_wimfile);
                        ret = -1;
                        goto out_free_src_wim;
                }