/* Path to extracted file, or "cookie" identifying the file (e.g. inode number).
* */
typedef union {
- const char *path;
+ const tchar *path;
u64 cookie;
} file_spec_t;
}
/* Set default flags and capture config on the update commands */
- bool have_add_command = false;
for (size_t i = 0; i < num_cmds; i++) {
switch (cmds[i].op) {
case WIMLIB_UPDATE_OP_ADD:
cmds[i].add.add_flags |= default_add_flags;
cmds[i].add.config = config;
- have_add_command = true;
break;
case WIMLIB_UPDATE_OP_DELETE:
cmds[i].delete.delete_flags |= default_delete_flags;
const tchar *wim_source_path)
{
const tchar *loc;
- const tchar *mode = "this extraction mode";
+ const tchar *mode = T("this extraction mode");
if (wim_source_path[0] == '\0')
- loc = "the WIM image";
+ loc = T("the WIM image");
else
loc = wim_source_path;
}
static int
-win32_create_file(const wchar_t *path, struct apply_ctx *ctx)
+win32_create_file(const wchar_t *path, struct apply_ctx *ctx, u64 *cookie_ret)
{
HANDLE h;
}
static int
-win32_create_directory(const wchar_t *path, struct apply_ctx *ctx)
+win32_create_directory(const wchar_t *path, struct apply_ctx *ctx,
+ u64 *cookie_ret)
{
if (!CreateDirectory(path, NULL))
if (GetLastError() != ERROR_ALREADY_EXISTS)
}
static int
-win32_extract_encrypted_stream(const wchar_t *path,
+win32_extract_encrypted_stream(file_spec_t file,
struct wim_lookup_table_entry *lte,
struct apply_ctx *ctx)
{
+ const tchar *path = file.path;
void *file_ctx;
DWORD err;
int ret;
goto error;
}
-success:
return 0;
error:
static void
win32_acquire_capture_and_apply_privileges(void)
{
- win32_modify_capture_privileges(true);
+ win32_modify_capture_and_apply_privileges(true);
}
static void
win32_release_capture_and_apply_privileges(void)
{
- win32_modify_capture_privileges(false);
+ win32_modify_capture_and_apply_privileges(false);
}
HANDLE
void
win32_global_init(int init_flags)
{
- DWORD err;
-
/* Try to acquire useful privileges. */
if (!(init_flags & WIMLIB_INIT_FLAG_DONT_ACQUIRE_PRIVILEGES)) {
win32_acquire_capture_and_apply_privileges();
win32func_FindFirstStreamW = NULL;
}
}
-
}
void