]> wimlib.net Git - wimlib/blobdiff - src/update_image.c
Win32: Fix drive root detection with \\?\-style paths
[wimlib] / src / update_image.c
index 317cca8a51d6c10cd99321cf33a78227f298b913..763f4dc410948e95251537cf6c8cf6705980df3d 100644 (file)
@@ -134,7 +134,7 @@ attach_branch(struct wim_dentry **root_p, struct wim_dentry *branch,
        /* Walk the path to the branch, creating filler directories as needed.
         * */
        parent = *root_p;
-       while ((slash = tstrchr(target_path, T('/')))) {
+       while ((slash = tstrchr(target_path, WIM_PATH_SEPARATOR))) {
                *slash = T('\0');
                dentry = get_dentry_child_with_name(parent, target_path);
                if (!dentry) {
@@ -150,7 +150,7 @@ attach_branch(struct wim_dentry **root_p, struct wim_dentry *branch,
                 * trailing slashes were tripped.  */
                do {
                        ++target_path;
-               } while (*target_path == T('/'));
+               } while (*target_path == WIM_PATH_SEPARATOR);
        }
 
        /* If the target path already existed, overlay the branch onto it.
@@ -249,7 +249,7 @@ execute_add_command(WIMStruct *wim,
        }
 
        if (wim_target_path[0] == T('\0'))
-               add_flags |= WIMLIB_ADD_FLAG_ROOT;
+               params.add_flags |= WIMLIB_ADD_FLAG_ROOT;
        ret = (*capture_tree)(&branch, fs_source_path, &params);
        if (ret) {
                ERROR("Failed to build dentry tree for \"%"TS"\"",