* ::WIMLIB_UPDATE_FLAG_SEND_PROGRESS. */
WIMLIB_PROGRESS_MSG_UPDATE_END_COMMAND,
+ /** A file in the WIM image is being replaced as a result of a
+ * ::wimlib_add_command without ::WIMLIB_ADD_FLAG_NO_REPLACE specified.
+ * This is only received when ::WIMLIB_ADD_FLAG_VERBOSE is also
+ * specified in the add command. */
+ WIMLIB_PROGRESS_MSG_REPLACE_FILE_IN_WIM,
};
/** A pointer to this union is passed to the user-supplied
* finished (::WIMLIB_PROGRESS_MSG_SPLIT_END_PART). */
const wimlib_tchar *part_name;
} split;
+
+ /** Valid on messages ::WIMLIB_PROGRESS_MSG_REPLACE_FILE_IN_WIM */
+ struct wimlib_progress_info_replace {
+ /** Path to the file in the WIM image that is being replaced */
+ const wimlib_tchar *path_in_wim;
+ } replace;
};
/** A user-supplied function that will be called periodically during certain WIM
#define WIMLIB_ADD_FLAG_WINCONFIG 0x00000800
/**
- * Capture image as WIMBoot compatible. In addition, use the capture
- * configuration file <c>$SOURCE/Windows/System32/WimBootCompress.ini</c> if it
- * exists, where <c>$SOURCE</c> is the directory being captured.
+ * Capture image as WIMBoot compatible. In addition, if no capture
+ * configuration file is explicitly specified use the capture configuration file
+ * <c>$SOURCE/Windows/System32/WimBootCompress.ini</c> if it exists, where
+ * <c>$SOURCE</c> is the directory being captured; or, if a capture
+ * configuration file is explicitly specified, use it and also place it at
+ * /Windows/System32/WimBootCompress.ini in the WIM image.
*
* Note: this will not by itself change the compression type. Before writing
* the WIM file, it's recommended to also do:
*/
#define WIMLIB_ADD_FLAG_WIMBOOT 0x00001000
+/**
+ * If the add command involves adding a non-directory file to a location at
+ * which there already exists a nondirectory file in the WIM image, issue
+ * ::WIMLIB_ERR_INVALID_OVERLAY instead of replacing the file. This only has an
+ * effect when updating an existing image with wimlib_update_image().
+ * This was the default behavior in wimlib v1.6.2 and earlier.
+ */
+#define WIMLIB_ADD_FLAG_NO_REPLACE 0x00002000
+
#define WIMLIB_ADD_IMAGE_FLAG_NTFS WIMLIB_ADD_FLAG_NTFS
#define WIMLIB_ADD_IMAGE_FLAG_DEREFERENCE WIMLIB_ADD_FLAG_DEREFERENCE
#define WIMLIB_ADD_IMAGE_FLAG_VERBOSE WIMLIB_ADD_FLAG_VERBOSE
*/
#define WIMLIB_EXTRACT_FLAG_NO_PRESERVE_DIR_STRUCTURE 0x00200000
-/** Windows only: Extract files as "pointers" back to the WIM archive. */
+/** Windows only: Extract files as "pointers" back to the WIM archive. See the
+ * documentation for the <b>--wimboot</b> option of <b>wimlib-imagex apply</b>
+ * for more information. */
#define WIMLIB_EXTRACT_FLAG_WIMBOOT 0x00400000
/** @} */
* If non-NULL, a function that will be called periodically with the
* progress of the current operation.
*
- * @return 0 on success; nonzero on error. On failure, some but not all of the
- * update commands may have been executed. No individual update command will
- * have been partially executed. Possible error codes include:
+ * @return 0 on success; nonzero on error. On failure, all update commands will
+ * be rolled back, and no visible changes shall have been made to @p wim.
+ * Possible error codes include:
*
* @retval ::WIMLIB_ERR_INVALID_CAPTURE_CONFIG
* The capture configuration structure specified for an add command was