]> wimlib.net Git - wimlib/blobdiff - src/update_image.c
Update version number to 1.4.0; update NEWS
[wimlib] / src / update_image.c
index 650dfbbd07fdf0726d3ce737085cdbf214eb9ae5..ecfef1fffa7bcc764edfc52fe318c1a3f37162ba 100644 (file)
 #include "xml.h"
 #include <errno.h>
 
+#ifdef __WIN32__
+#  include "win32.h"
+#endif
+
 /* Overlays @branch onto @target, both of which must be directories. */
 static int
 do_overlay(struct wim_dentry *target, struct wim_dentry *branch)
@@ -295,6 +299,8 @@ execute_delete_command(WIMStruct *wim,
        flags = delete_cmd->delete.delete_flags;
        wim_path = delete_cmd->delete.wim_path;
 
+       DEBUG("Deleting WIM path \"%"TS"\" (flags=%#x)", wim_path, flags);
+
        tree = get_dentry(wim, wim_path);
        if (!tree) {
                /* Path to delete does not exist in the WIM. */
@@ -322,7 +328,7 @@ execute_delete_command(WIMStruct *wim,
        return 0;
 }
 
-/* 
+/*
  * Rename a file or directory in the WIM.
  *
  * This is also called from wimfs_rename() in the FUSE mount code.
@@ -574,7 +580,7 @@ free_update_commands(struct wimlib_update_command *cmds, size_t num_cmds)
 {
        if (cmds) {
                for (size_t i = 0; i < num_cmds; i++) {
-                       switch (cmds->op) {
+                       switch (cmds[i].op) {
                        case WIMLIB_UPDATE_OP_ADD:
                                FREE(cmds[i].add.fs_source_path);
                                FREE(cmds[i].add.wim_target_path);
@@ -587,6 +593,8 @@ free_update_commands(struct wimlib_update_command *cmds, size_t num_cmds)
                                FREE(cmds[i].rename.wim_source_path);
                                FREE(cmds[i].rename.wim_target_path);
                                break;
+                       default:
+                               wimlib_assert(0);
                        }
                }
                FREE(cmds);