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 1eb8489..c1b064d 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;
                }