]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
disk (win32): use the provided path for CreateFile
authorDustin L. Howett <dustin@howett.net>
Fri, 26 Jun 2026 14:36:33 +0000 (09:36 -0500)
committerDustin L. Howett <dustin@howett.net>
Sat, 27 Jun 2026 18:44:07 +0000 (13:44 -0500)
libarchive/archive_write_disk_windows.c

index 435f0cdb9cede04295575d3f4e128b12d866f2eb..d22af4762c25ce55bf9494d2199a2ee39c615533 100644 (file)
@@ -282,10 +282,10 @@ file_information(struct archive_write_disk *a, wchar_t *path,
        ZeroMemory(&createExParams, sizeof(createExParams));
        createExParams.dwSize = sizeof(createExParams);
        createExParams.dwFileFlags = flag;
-       h = CreateFile2(a->name, 0, 0,
+       h = CreateFile2(path, 0, 0,
                OPEN_EXISTING, &createExParams);
 #else
-       h = CreateFileW(a->name, 0, 0, NULL,
+       h = CreateFileW(path, 0, 0, NULL,
            OPEN_EXISTING, flag, NULL);
 #endif
        if (h == INVALID_HANDLE_VALUE &&