]> wimlib.net Git - wimlib/blobdiff - src/update_image.c
wimextract: allow specifying listfile on stdin
[wimlib] / src / update_image.c
index fb5356338b7e174dfbc578b16c671c236ff75724..2247a7f6840307751936b69f6ad618c30ecabf2a 100644 (file)
@@ -64,6 +64,7 @@
 #include "wimlib/paths.h"
 #include "wimlib/progress.h"
 #include "wimlib/scan.h"
+#include "wimlib/test_support.h"
 #include "wimlib/xml_windows.h"
 
 /* Saved specification of a "primitive" update operation that was performed.  */
@@ -715,6 +716,8 @@ static const char wincfg[] =
 "/swapfile.sys\n"
 "/System Volume Information\n"
 "/RECYCLER\n"
+"/$RECYCLE.BIN\n"
+"/$Recycle.Bin\n"
 "/Windows/CSC\n";
 
 static const tchar *wimboot_cfgfile =
@@ -803,6 +806,11 @@ execute_add_command(struct update_command_journal *j,
                scan_tree = ntfs_3g_build_dentry_tree;
 #endif
 
+#ifdef ENABLE_TEST_SUPPORT
+       if (add_flags & WIMLIB_ADD_FLAG_GENERATE_TEST_DATA)
+               scan_tree = generate_dentry_tree;
+#endif
+
        ret = get_capture_config(config_file, &config,
                                 add_flags, fs_source_path);
        if (ret)
@@ -880,6 +888,7 @@ execute_add_command(struct update_command_journal *j,
 out_destroy_config:
        destroy_capture_config(&config);
 out:
+       FREE(params.cur_path);
        return ret;
 }
 
@@ -1206,6 +1215,9 @@ check_add_command(struct wimlib_update_command *cmd,
                          WIMLIB_ADD_FLAG_NO_REPLACE |
                          WIMLIB_ADD_FLAG_TEST_FILE_EXCLUSION |
                          WIMLIB_ADD_FLAG_SNAPSHOT |
+               #ifdef ENABLE_TEST_SUPPORT
+                         WIMLIB_ADD_FLAG_GENERATE_TEST_DATA |
+               #endif
                          WIMLIB_ADD_FLAG_FILE_PATHS_UNNEEDED))
                return WIMLIB_ERR_INVALID_PARAM;