From 5234a83ed14108b538b93bf5d4460068a45b07d1 Mon Sep 17 00:00:00 2001 From: Eric Biggers Date: Thu, 16 Jan 2014 21:28:00 -0600 Subject: [PATCH] Only allow default RPFIX for wimlib_extract_image{,_from_pipe}() --- include/wimlib.h | 5 +++-- src/extract.c | 6 ++++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/include/wimlib.h b/include/wimlib.h index d039895e..d8806b97 100644 --- a/include/wimlib.h +++ b/include/wimlib.h @@ -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 diff --git a/src/extract.c b/src/extract.c index 995f9cbb..220250a6 100644 --- a/src/extract.c +++ b/src/extract.c @@ -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. */ -- 2.43.0