#ifdef __WIN32__
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
#include <aclapi.h> /* for SetSecurityInfo() */
-#include "win32_common.h"
-#include "wimlib_internal.h"
-#include "dentry.h"
-#include "lookup_table.h"
-#include "endianness.h"
+#include "wimlib/win32_common.h"
+
+#include "wimlib/apply.h"
+#include "wimlib/dentry.h"
+#include "wimlib/endianness.h"
+#include "wimlib/error.h"
+#include "wimlib/lookup_table.h"
+#include "wimlib/metadata.h"
+#include "wimlib/reparse.h"
+#include "wimlib/security.h"
#define MAX_CREATE_HARD_LINK_WARNINGS 5
#define MAX_CREATE_SOFT_LINK_WARNINGS 5
int ret;
u8 rpbuf[REPARSE_POINT_MAX_SIZE];
DWORD bytesReturned;
+ u16 rpbuflen;
DEBUG("Setting reparse data on \"%ls\"", path);
- ret = wim_inode_get_reparse_data(inode, rpbuf);
+ ret = wim_inode_get_reparse_data(inode, rpbuf, &rpbuflen);
if (ret)
return ret;
* "Not used with this operation; set to NULL."
*/
if (!DeviceIoControl(h, FSCTL_SET_REPARSE_POINT, rpbuf,
- 8 + le16_to_cpu(*(u16*)(rpbuf + 4)),
+ rpbuflen,
NULL, 0,
&bytesReturned /* lpBytesReturned */,
NULL /* lpOverlapped */))
{
int ret = 0;
const struct wim_inode *inode = dentry->d_inode;
- const wchar_t *short_name;
if (stream_name_utf16 == NULL) {
/* Unnamed stream. */
}
if (dentry_has_short_name(dentry))
- SetFileShortNameW(h, short_name);
+ SetFileShortNameW(h, dentry->short_name);
else if (running_on_windows_7_or_later())
SetFileShortNameW(h, L"");
} else {