You've already forked wine-staging
mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2025-09-12 18:50:20 -07:00
Rebase against b360cd67e8f7f8c01f09457bacb032fd4a248d0a
This commit is contained in:
@@ -1,20 +1,20 @@
|
||||
From 641f298192f9c21e2e02f0e5296771454d3467d3 Mon Sep 17 00:00:00 2001
|
||||
From b53336eeca65aa2dbf11c2d80a731ca904fe81de Mon Sep 17 00:00:00 2001
|
||||
From: "Erich E. Hoover" <erich.e.hoover@gmail.com>
|
||||
Date: Thu, 16 Jan 2014 21:02:11 -0700
|
||||
Subject: kernel32,ntdll: Add support for deleting junction points with
|
||||
Subject: [PATCH] kernel32,ntdll: Add support for deleting junction points with
|
||||
RemoveDirectory.
|
||||
|
||||
Signed-off-by: Erich E. Hoover <erich.e.hoover@gmail.com>
|
||||
---
|
||||
dlls/kernel32/path.c | 20 +++++++++++++-------
|
||||
dlls/kernel32/path.c | 19 +++++++++++++------
|
||||
dlls/ntdll/tests/file.c | 34 +++++++++++++++++++++++++++++++++-
|
||||
2 files changed, 46 insertions(+), 8 deletions(-)
|
||||
2 files changed, 46 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/dlls/kernel32/path.c b/dlls/kernel32/path.c
|
||||
index 5fed28da0e..5ef66b5913 100644
|
||||
index b580e367561..9fa7d4c9f27 100644
|
||||
--- a/dlls/kernel32/path.c
|
||||
+++ b/dlls/kernel32/path.c
|
||||
@@ -1696,6 +1696,7 @@ BOOL WINAPI CreateDirectoryExW( LPCWSTR template, LPCWSTR path, LPSECURITY_ATTRI
|
||||
@@ -1058,6 +1058,7 @@ BOOL WINAPI CreateDirectoryExA( LPCSTR template, LPCSTR path, LPSECURITY_ATTRIBU
|
||||
*/
|
||||
BOOL WINAPI RemoveDirectoryW( LPCWSTR path )
|
||||
{
|
||||
@@ -22,15 +22,14 @@ index 5fed28da0e..5ef66b5913 100644
|
||||
OBJECT_ATTRIBUTES attr;
|
||||
UNICODE_STRING nt_name;
|
||||
ANSI_STRING unix_name;
|
||||
@@ -1729,16 +1730,21 @@ BOOL WINAPI RemoveDirectoryW( LPCWSTR path )
|
||||
@@ -1089,15 +1090,21 @@ BOOL WINAPI RemoveDirectoryW( LPCWSTR path )
|
||||
}
|
||||
|
||||
status = wine_nt_to_unix_file_name( &nt_name, &unix_name, FILE_OPEN, FALSE );
|
||||
- RtlFreeUnicodeString( &nt_name );
|
||||
- if (status != STATUS_SUCCESS)
|
||||
- if (!set_ntstatus( status ))
|
||||
+ if (status == STATUS_SUCCESS)
|
||||
{
|
||||
- SetLastError( RtlNtStatusToDosError(status) );
|
||||
- NtClose( handle );
|
||||
- return FALSE;
|
||||
+ status = NtQueryAttributesFile( &attr, &info );
|
||||
@@ -43,7 +42,7 @@ index 5fed28da0e..5ef66b5913 100644
|
||||
+ RtlFreeAnsiString( &unix_name );
|
||||
}
|
||||
+ else
|
||||
+ SetLastError( RtlNtStatusToDosError(status) );
|
||||
+ set_ntstatus( status );
|
||||
+ RtlFreeUnicodeString( &nt_name );
|
||||
|
||||
- if (!(ret = (rmdir( unix_name.Buffer ) != -1))) FILE_SetDosError();
|
||||
@@ -52,10 +51,10 @@ index 5fed28da0e..5ef66b5913 100644
|
||||
return ret;
|
||||
}
|
||||
diff --git a/dlls/ntdll/tests/file.c b/dlls/ntdll/tests/file.c
|
||||
index e1f216370d..71e7dd56f3 100644
|
||||
index d7b2f9aa0d9..e8cdb661772 100644
|
||||
--- a/dlls/ntdll/tests/file.c
|
||||
+++ b/dlls/ntdll/tests/file.c
|
||||
@@ -4869,7 +4869,7 @@ static void test_reparse_points(void)
|
||||
@@ -4938,7 +4938,7 @@ static void test_reparse_points(void)
|
||||
REPARSE_GUID_DATA_BUFFER guid_buffer;
|
||||
static const WCHAR dotW[] = {'.',0};
|
||||
REPARSE_DATA_BUFFER *buffer = NULL;
|
||||
@@ -64,7 +63,7 @@ index e1f216370d..71e7dd56f3 100644
|
||||
INT buffer_len, string_len;
|
||||
IO_STATUS_BLOCK iosb;
|
||||
UNICODE_STRING nameW;
|
||||
@@ -4958,6 +4958,38 @@ static void test_reparse_points(void)
|
||||
@@ -5027,6 +5027,38 @@ static void test_reparse_points(void)
|
||||
"Junction point folder's access time does not match.\n");
|
||||
CloseHandle(handle);
|
||||
|
||||
@@ -104,5 +103,5 @@ index e1f216370d..71e7dd56f3 100644
|
||||
/* Cleanup */
|
||||
pRtlFreeUnicodeString(&nameW);
|
||||
--
|
||||
2.17.1
|
||||
2.23.0
|
||||
|
||||
|
@@ -1,19 +1,19 @@
|
||||
From f8bce6f4c951b6d5b1b3473b272a3fe20df0aa39 Mon Sep 17 00:00:00 2001
|
||||
From 9761db5bf17b98a9ae7f47fc5cf3e4eb98911af1 Mon Sep 17 00:00:00 2001
|
||||
From: "Erich E. Hoover" <erich.e.hoover@gmail.com>
|
||||
Date: Wed, 13 Mar 2019 16:02:05 -0600
|
||||
Subject: kernel32: Implement CreateSymbolicLink[A|W] with ntdll reparse
|
||||
points.
|
||||
Subject: [PATCH] kernel32: Implement CreateSymbolicLink[A|W] with ntdll
|
||||
reparse points.
|
||||
|
||||
Signed-off-by: Erich E. Hoover <erich.e.hoover@gmail.com>
|
||||
---
|
||||
dlls/kernel32/path.c | 124 +++++++++++++++++++++++++++++++--
|
||||
dlls/kernel32/tests/path.c | 94 +++++++++++++++++++++++++
|
||||
dlls/kernel32/tests/path.c | 96 +++++++++++++++++++++++++
|
||||
dlls/msvcp120/tests/msvcp120.c | 75 +++++++++-----------
|
||||
dlls/msvcp140/tests/msvcp140.c | 63 +++++++----------
|
||||
4 files changed, 275 insertions(+), 81 deletions(-)
|
||||
4 files changed, 277 insertions(+), 81 deletions(-)
|
||||
|
||||
diff --git a/dlls/kernel32/path.c b/dlls/kernel32/path.c
|
||||
index 227473f71a..fd69cdede4 100644
|
||||
index 31da8fed4f5..2e57a3b38c9 100644
|
||||
--- a/dlls/kernel32/path.c
|
||||
+++ b/dlls/kernel32/path.c
|
||||
@@ -34,6 +34,8 @@
|
||||
@@ -25,7 +25,7 @@ index 227473f71a..fd69cdede4 100644
|
||||
|
||||
#include "kernel_private.h"
|
||||
#include "wine/unicode.h"
|
||||
@@ -2087,8 +2089,106 @@ WCHAR * CDECL wine_get_dos_file_name( LPCSTR str )
|
||||
@@ -1260,8 +1262,106 @@ WCHAR * CDECL wine_get_dos_file_name( LPCSTR str )
|
||||
*/
|
||||
BOOLEAN WINAPI CreateSymbolicLinkW(LPCWSTR link, LPCWSTR target, DWORD flags)
|
||||
{
|
||||
@@ -134,7 +134,7 @@ index 227473f71a..fd69cdede4 100644
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
@@ -2096,8 +2196,24 @@ BOOLEAN WINAPI CreateSymbolicLinkW(LPCWSTR link, LPCWSTR target, DWORD flags)
|
||||
@@ -1269,8 +1369,24 @@ BOOLEAN WINAPI CreateSymbolicLinkW(LPCWSTR link, LPCWSTR target, DWORD flags)
|
||||
*/
|
||||
BOOLEAN WINAPI CreateSymbolicLinkA(LPCSTR link, LPCSTR target, DWORD flags)
|
||||
{
|
||||
@@ -162,10 +162,10 @@ index 227473f71a..fd69cdede4 100644
|
||||
|
||||
/*************************************************************************
|
||||
diff --git a/dlls/kernel32/tests/path.c b/dlls/kernel32/tests/path.c
|
||||
index f15cc09ee5..346591990f 100644
|
||||
index 876ca743bc1..976993c9221 100644
|
||||
--- a/dlls/kernel32/tests/path.c
|
||||
+++ b/dlls/kernel32/tests/path.c
|
||||
@@ -81,6 +81,9 @@ static void (WINAPI *pReleaseActCtx)(HANDLE);
|
||||
@@ -87,6 +87,9 @@ static void (WINAPI *pReleaseActCtx)(HANDLE);
|
||||
static BOOL (WINAPI *pCheckNameLegalDOS8Dot3W)(const WCHAR *, char *, DWORD, BOOL *, BOOL *);
|
||||
static BOOL (WINAPI *pCheckNameLegalDOS8Dot3A)(const char *, char *, DWORD, BOOL *, BOOL *);
|
||||
|
||||
@@ -175,16 +175,21 @@ index f15cc09ee5..346591990f 100644
|
||||
/* a structure to deal with wine todos somewhat cleanly */
|
||||
typedef struct {
|
||||
DWORD shortlen;
|
||||
@@ -2202,6 +2205,7 @@ static void init_pointers(void)
|
||||
@@ -2209,9 +2212,12 @@ static void init_pointers(void)
|
||||
MAKEFUNC(ReleaseActCtx);
|
||||
MAKEFUNC(CheckNameLegalDOS8Dot3W);
|
||||
MAKEFUNC(CheckNameLegalDOS8Dot3A);
|
||||
+ MAKEFUNC(CreateSymbolicLinkW);
|
||||
+
|
||||
mod = GetModuleHandleA("ntdll.dll");
|
||||
MAKEFUNC(RtlGetSearchPath);
|
||||
MAKEFUNC(RtlReleasePath);
|
||||
+
|
||||
#undef MAKEFUNC
|
||||
}
|
||||
|
||||
@@ -2458,6 +2462,95 @@ static void test_SetSearchPathMode(void)
|
||||
RemoveDirectoryA( dir );
|
||||
@@ -2549,6 +2555,95 @@ static void test_RtlGetSearchPath(void)
|
||||
SetEnvironmentVariableW( pathW, old_path );
|
||||
}
|
||||
|
||||
+static void test_CreateSymbolicLink(void)
|
||||
@@ -279,17 +284,17 @@ index f15cc09ee5..346591990f 100644
|
||||
START_TEST(path)
|
||||
{
|
||||
CHAR origdir[MAX_PATH],curdir[MAX_PATH], curDrive, otherDrive;
|
||||
@@ -2492,4 +2585,5 @@ START_TEST(path)
|
||||
test_GetFullPathNameW();
|
||||
@@ -2584,4 +2679,5 @@ START_TEST(path)
|
||||
test_CheckNameLegalDOS8Dot3();
|
||||
test_SetSearchPathMode();
|
||||
test_RtlGetSearchPath();
|
||||
+ test_CreateSymbolicLink();
|
||||
}
|
||||
diff --git a/dlls/msvcp120/tests/msvcp120.c b/dlls/msvcp120/tests/msvcp120.c
|
||||
index c416a1020b..e0c97ebcaa 100644
|
||||
index 8f7b75aab4b..77d8c377549 100644
|
||||
--- a/dlls/msvcp120/tests/msvcp120.c
|
||||
+++ b/dlls/msvcp120/tests/msvcp120.c
|
||||
@@ -1636,15 +1636,14 @@ static void test_tr2_sys__Stat(void)
|
||||
@@ -1622,15 +1622,14 @@ static void test_tr2_sys__Stat(void)
|
||||
char const *path;
|
||||
enum file_type ret;
|
||||
int err_code;
|
||||
@@ -312,7 +317,7 @@ index c416a1020b..e0c97ebcaa 100644
|
||||
};
|
||||
WCHAR testW[] = {'t','r','2','_','t','e','s','t','_','d','i','r',0};
|
||||
WCHAR testW2[] = {'t','r','2','_','t','e','s','t','_','d','i','r','/','f','1',0};
|
||||
@@ -1689,16 +1688,14 @@ static void test_tr2_sys__Stat(void)
|
||||
@@ -1675,16 +1674,14 @@ static void test_tr2_sys__Stat(void)
|
||||
for(i=0; i<ARRAY_SIZE(tests); i++) {
|
||||
err_code = 0xdeadbeef;
|
||||
val = p_tr2_sys__Stat(tests[i].path, &err_code);
|
||||
@@ -331,7 +336,7 @@ index c416a1020b..e0c97ebcaa 100644
|
||||
ok(tests[i].err_code == err_code, "tr2_sys__Lstat(): test %d err_code expect: %d, got %d\n",
|
||||
i+1, tests[i].err_code, err_code);
|
||||
}
|
||||
@@ -1713,8 +1710,8 @@ static void test_tr2_sys__Stat(void)
|
||||
@@ -1699,8 +1696,8 @@ static void test_tr2_sys__Stat(void)
|
||||
ok(ERROR_SUCCESS == err_code, "tr2_sys__Lstat_wchar(): err_code expect ERROR_SUCCESS, got %d\n", err_code);
|
||||
|
||||
if(ret) {
|
||||
@@ -342,7 +347,7 @@ index c416a1020b..e0c97ebcaa 100644
|
||||
}
|
||||
ok(DeleteFileA("tr2_test_dir/f1"), "expect tr2_test_dir/f1 to exist\n");
|
||||
ok(RemoveDirectoryA("tr2_test_dir"), "expect tr2_test_dir to exist\n");
|
||||
@@ -1944,16 +1941,15 @@ static void test_tr2_sys__Symlink(void)
|
||||
@@ -1930,16 +1927,15 @@ static void test_tr2_sys__Symlink(void)
|
||||
char const *existing_path;
|
||||
char const *new_path;
|
||||
int last_error;
|
||||
@@ -367,7 +372,7 @@ index c416a1020b..e0c97ebcaa 100644
|
||||
};
|
||||
|
||||
ret = p_tr2_sys__Make_dir("tr2_test_dir");
|
||||
@@ -1978,18 +1974,17 @@ static void test_tr2_sys__Symlink(void)
|
||||
@@ -1964,18 +1960,17 @@ static void test_tr2_sys__Symlink(void)
|
||||
}
|
||||
|
||||
ok(errno == 0xdeadbeef, "tr2_sys__Symlink(): test %d errno expect 0xdeadbeef, got %d\n", i+1, errno);
|
||||
@@ -392,7 +397,7 @@ index c416a1020b..e0c97ebcaa 100644
|
||||
ret = p_tr2_sys__Remove_dir("tr2_test_dir");
|
||||
ok(ret == 1, "tr2_sys__Remove_dir(): expect 1 got %d\n", ret);
|
||||
}
|
||||
@@ -2003,15 +1998,14 @@ static void test_tr2_sys__Unlink(void)
|
||||
@@ -1989,15 +1984,14 @@ static void test_tr2_sys__Unlink(void)
|
||||
struct {
|
||||
char const *path;
|
||||
int last_error;
|
||||
@@ -415,7 +420,7 @@ index c416a1020b..e0c97ebcaa 100644
|
||||
};
|
||||
|
||||
GetCurrentDirectoryA(MAX_PATH, current_path);
|
||||
@@ -2040,9 +2034,8 @@ static void test_tr2_sys__Unlink(void)
|
||||
@@ -2026,9 +2020,8 @@ static void test_tr2_sys__Unlink(void)
|
||||
for(i=0; i<ARRAY_SIZE(tests); i++) {
|
||||
errno = 0xdeadbeef;
|
||||
ret = p_tr2_sys__Unlink(tests[i].path);
|
||||
@@ -428,7 +433,7 @@ index c416a1020b..e0c97ebcaa 100644
|
||||
}
|
||||
|
||||
diff --git a/dlls/msvcp140/tests/msvcp140.c b/dlls/msvcp140/tests/msvcp140.c
|
||||
index 04406240e0..46b2b8595d 100644
|
||||
index 04406240e0f..46b2b8595dd 100644
|
||||
--- a/dlls/msvcp140/tests/msvcp140.c
|
||||
+++ b/dlls/msvcp140/tests/msvcp140.c
|
||||
@@ -802,16 +802,15 @@ static void test_Stat(void)
|
||||
@@ -538,5 +543,5 @@ index 04406240e0..46b2b8595d 100644
|
||||
}
|
||||
|
||||
--
|
||||
2.17.1
|
||||
2.23.0
|
||||
|
||||
|
Reference in New Issue
Block a user