mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2024-11-21 16:46:54 -08:00
Fix a bug in determining the type of delete operation for junction points.
This commit is contained in:
parent
7ba4197cbe
commit
5bb17cb9ed
@ -1,19 +1,19 @@
|
||||
From efdf5b9546b3c56a8f02c667755ebda2fd944bc8 Mon Sep 17 00:00:00 2001
|
||||
From b36e62b1765283f503c2ef42b10a139955949c86 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
|
||||
RemoveDirectory.
|
||||
|
||||
---
|
||||
dlls/kernel32/path.c | 18 +++++++++++++-----
|
||||
dlls/ntdll/tests/file.c | 34 +++++++++++++++++++++++++++++++++-
|
||||
2 files changed, 46 insertions(+), 6 deletions(-)
|
||||
dlls/kernel32/path.c | 21 ++++++++++++++-------
|
||||
dlls/ntdll/tests/file.c | 34 +++++++++++++++++++++++++++++++++-
|
||||
2 files changed, 47 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/dlls/kernel32/path.c b/dlls/kernel32/path.c
|
||||
index 7e20dc3..9f083f8 100644
|
||||
index 22d21c5..63901d2 100644
|
||||
--- a/dlls/kernel32/path.c
|
||||
+++ b/dlls/kernel32/path.c
|
||||
@@ -1587,6 +1587,7 @@ BOOL WINAPI CreateDirectoryExW( LPCWSTR template, LPCWSTR path, LPSECURITY_ATTRI
|
||||
@@ -1583,6 +1583,7 @@ BOOL WINAPI CreateDirectoryExW( LPCWSTR template, LPCWSTR path, LPSECURITY_ATTRI
|
||||
*/
|
||||
BOOL WINAPI RemoveDirectoryW( LPCWSTR path )
|
||||
{
|
||||
@ -21,10 +21,12 @@ index 7e20dc3..9f083f8 100644
|
||||
OBJECT_ATTRIBUTES attr;
|
||||
UNICODE_STRING nt_name;
|
||||
ANSI_STRING unix_name;
|
||||
@@ -1622,13 +1623,20 @@ BOOL WINAPI RemoveDirectoryW( LPCWSTR path )
|
||||
status = wine_nt_to_unix_file_name( &nt_name, &unix_name, FILE_OPEN, FALSE );
|
||||
RtlFreeUnicodeString( &nt_name );
|
||||
@@ -1616,15 +1617,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)
|
||||
- SetLastError( RtlNtStatusToDosError(status) );
|
||||
- else if (!(ret = (rmdir( unix_name.Buffer ) != -1)))
|
||||
@ -43,6 +45,7 @@ index 7e20dc3..9f083f8 100644
|
||||
+ }
|
||||
+ else
|
||||
+ SetLastError( RtlNtStatusToDosError(status) );
|
||||
+ RtlFreeUnicodeString( &nt_name );
|
||||
+
|
||||
NtClose( handle );
|
||||
return ret;
|
||||
@ -100,5 +103,5 @@ index 965ca62..acc9197 100644
|
||||
/* Cleanup */
|
||||
pRtlFreeUnicodeString( &nameW );
|
||||
--
|
||||
1.7.9.5
|
||||
1.9.1
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user