Only allow default RPFIX for wimlib_extract_image{,_from_pipe}()
authorEric Biggers <ebiggers3@gmail.com>
Fri, 17 Jan 2014 03:28:00 +0000 (21:28 -0600)
committerEric Biggers <ebiggers3@gmail.com>
Fri, 17 Jan 2014 03:28:35 +0000 (21:28 -0600)
include/wimlib.h
src/extract.c

index d039895..d8806b9 100644 (file)
@@ -1476,8 +1476,9 @@ typedef int (*wimlib_iterate_lookup_table_callback_t)(const struct wimlib_resour
 
 /** This is the extraction equivalent to ::WIMLIB_ADD_FLAG_RPFIX.  This forces
  * reparse-point fixups on, so absolute symbolic links or junction points will
- * be fixed to be absolute relative to the actual extraction root.  Reparse
- * point fixups are done by default if WIM_HDR_FLAG_RP_FIX is set in the WIM
+ * be fixed to be absolute relative to the actual extraction root.  Reparse-
+ * point fixups are done by default for wimlib_extract_image() and
+ * wimlib_extract_image_from_pipe() if WIM_HDR_FLAG_RP_FIX is set in the WIM
  * header.  This flag cannot be combined with ::WIMLIB_EXTRACT_FLAG_NORPFIX.  */
 #define WIMLIB_EXTRACT_FLAG_RPFIX                      0x00000100
 
index 995f9cb..220250a 100644 (file)
@@ -85,7 +85,7 @@
         WIMLIB_EXTRACT_FLAG_RPFIX                      |       \
         WIMLIB_EXTRACT_FLAG_NORPFIX                    |       \
         WIMLIB_EXTRACT_FLAG_TO_STDOUT                  |       \
-        WIMLIB_EXTRACT_FLAG_REPLACE_INVALID_FILENAMES  |       \
+        WIMLIB_EXTRACT_FLAG_REPLACE_INVALID_FILENAMES  |       \
         WIMLIB_EXTRACT_FLAG_ALL_CASE_CONFLICTS         |       \
         WIMLIB_EXTRACT_FLAG_STRICT_TIMESTAMPS          |       \
         WIMLIB_EXTRACT_FLAG_STRICT_SHORT_NAMES         |       \
@@ -2586,7 +2586,9 @@ check_extract_flags(const WIMStruct *wim, int *extract_flags_p)
 #endif
 
        if ((extract_flags & (WIMLIB_EXTRACT_FLAG_RPFIX |
-                             WIMLIB_EXTRACT_FLAG_NORPFIX)) == 0)
+                             WIMLIB_EXTRACT_FLAG_NORPFIX |
+                             WIMLIB_EXTRACT_FLAG_IMAGEMODE)) ==
+                                       WIMLIB_EXTRACT_FLAG_IMAGEMODE)
        {
                /* Do reparse point fixups by default if the WIM header says
                 * they are enabled.  */