]> wimlib.net Git - wimlib/blobdiff - programs/imagex.c
wimexport: allow exporting to archive directly on block device
[wimlib] / 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;
                }