]> wimlib.net Git - wimlib/blobdiff - src/reparse.c
Preliminary support for native fds (UNIX only so far)
[wimlib] / src / reparse.c
index a245a7e16a455e0575d8caffab6ae002d20f3503..133603976f1bfc53d59e6b0e5bc0682f7ca49984 100644 (file)
@@ -225,7 +225,7 @@ wim_inode_get_reparse_data(const struct wim_inode *inode, u8 *rpbuf)
        }
 
        /* Read the data from the WIM file */
-       ret = read_full_resource_into_buf(lte, rpbuf + 8, true);
+       ret = read_full_resource_into_buf(lte, rpbuf + 8);
        if (ret)
                return ret;
 
@@ -465,6 +465,12 @@ capture_fixup_absolute_symlink(tchar *dest,
 {
        tchar *p = dest;
 
+#ifdef __WIN32__
+       /* Skip drive letter */
+       if (!is_rp_path_separator(*dest))
+               p += 2;
+#endif
+
        DEBUG("Fixing symlink or junction \"%"TS"\"", dest);
        for (;;) {
                tchar save;
@@ -491,6 +497,13 @@ capture_fixup_absolute_symlink(tchar *dest,
                                *(p - 1) = RP_PATH_SEPARATOR;
                        while (p - 1 >= dest && is_rp_path_separator(*(p - 1)))
                                p--;
+               #ifdef __WIN32__
+                       if (!is_rp_path_separator(dest[0])) {
+                               *--p = dest[1];
+                               *--p = dest[0];
+                       }
+               #endif
+                       wimlib_assert(p >= dest);
                        return p;
                }