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 00e55c8fc0c08e14c39880e62526f8503468b641
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
From 916221d26598c06a07e84d980ae4c16e92b38ebd Mon Sep 17 00:00:00 2001
|
||||
From f1cc7357530e993ca472d496bdcf8f38d931ccb6 Mon Sep 17 00:00:00 2001
|
||||
From: "Erich E. Hoover" <erich.e.hoover@gmail.com>
|
||||
Date: Sat, 30 Mar 2019 12:00:51 -0600
|
||||
Subject: ntdll: Correctly report file symbolic links as files.
|
||||
Subject: [PATCH] ntdll: Correctly report file symbolic links as files.
|
||||
|
||||
Signed-off-by: Erich E. Hoover <erich.e.hoover@gmail.com>
|
||||
---
|
||||
@@ -10,7 +10,7 @@ Signed-off-by: Erich E. Hoover <erich.e.hoover@gmail.com>
|
||||
2 files changed, 84 insertions(+), 44 deletions(-)
|
||||
|
||||
diff --git a/dlls/ntdll/file.c b/dlls/ntdll/file.c
|
||||
index 3e1121e521..be594ea517 100644
|
||||
index e1f9ef1199c..fd3a48dffec 100644
|
||||
--- a/dlls/ntdll/file.c
|
||||
+++ b/dlls/ntdll/file.c
|
||||
@@ -124,6 +124,9 @@ mode_t FILE_umask = 0;
|
||||
@@ -23,7 +23,7 @@ index 3e1121e521..be594ea517 100644
|
||||
/* fetch the attributes of a file */
|
||||
static inline ULONG get_file_attributes( const struct stat *st )
|
||||
{
|
||||
@@ -160,10 +163,15 @@ int get_file_info( const char *path, struct stat *st, ULONG *attr )
|
||||
@@ -171,10 +174,15 @@ int get_file_info( const char *path, struct stat *st, ULONG *attr )
|
||||
if (ret == -1) return ret;
|
||||
if (S_ISLNK( st->st_mode ))
|
||||
{
|
||||
@@ -41,9 +41,9 @@ index 3e1121e521..be594ea517 100644
|
||||
+ if (FILE_DecodeSymlink( path, NULL, NULL, NULL, NULL, &is_dir ) == STATUS_SUCCESS)
|
||||
+ st->st_mode = (st->st_mode & ~S_IFMT) | (is_dir ? S_IFDIR : S_IFREG);
|
||||
}
|
||||
*attr |= get_file_attributes( st );
|
||||
return ret;
|
||||
@@ -1817,48 +1825,33 @@ cleanup:
|
||||
else if (S_ISDIR( st->st_mode ) && (parent_path = RtlAllocateHeap( GetProcessHeap(), 0, strlen(path) + 4 )))
|
||||
{
|
||||
@@ -1842,48 +1850,33 @@ cleanup:
|
||||
}
|
||||
|
||||
|
||||
@@ -107,7 +107,7 @@ index 3e1121e521..be594ea517 100644
|
||||
p++;
|
||||
}
|
||||
if (*p++ != '/')
|
||||
@@ -1866,7 +1859,7 @@ NTSTATUS FILE_GetSymlink(HANDLE handle, REPARSE_DATA_BUFFER *buffer, ULONG out_s
|
||||
@@ -1891,7 +1884,7 @@ NTSTATUS FILE_GetSymlink(HANDLE handle, REPARSE_DATA_BUFFER *buffer, ULONG out_s
|
||||
status = STATUS_NOT_IMPLEMENTED;
|
||||
goto cleanup;
|
||||
}
|
||||
@@ -116,7 +116,7 @@ index 3e1121e521..be594ea517 100644
|
||||
for (i = 0; i < sizeof(ULONG)*8; i++)
|
||||
{
|
||||
char c = *p++;
|
||||
@@ -1881,21 +1874,68 @@ NTSTATUS FILE_GetSymlink(HANDLE handle, REPARSE_DATA_BUFFER *buffer, ULONG out_s
|
||||
@@ -1906,21 +1899,68 @@ NTSTATUS FILE_GetSymlink(HANDLE handle, REPARSE_DATA_BUFFER *buffer, ULONG out_s
|
||||
status = STATUS_NOT_IMPLEMENTED;
|
||||
goto cleanup;
|
||||
}
|
||||
@@ -191,10 +191,10 @@ index 3e1121e521..be594ea517 100644
|
||||
/* convert the relative path into an absolute path */
|
||||
if (flags == SYMLINK_FLAG_RELATIVE)
|
||||
diff --git a/dlls/ntdll/tests/file.c b/dlls/ntdll/tests/file.c
|
||||
index b904bc1f2d..fbd824fd10 100644
|
||||
index 1f278f63963..dfc3617ec01 100644
|
||||
--- a/dlls/ntdll/tests/file.c
|
||||
+++ b/dlls/ntdll/tests/file.c
|
||||
@@ -5065,13 +5065,13 @@ static void test_reparse_points(void)
|
||||
@@ -5188,13 +5188,13 @@ static void test_reparse_points(void)
|
||||
|
||||
/* Check deleting a file symlink as if it were a directory */
|
||||
bret = RemoveDirectoryW(reparse_path);
|
||||
@@ -210,7 +210,7 @@ index b904bc1f2d..fbd824fd10 100644
|
||||
ok(dwret & FILE_ATTRIBUTE_REPARSE_POINT, "File is not a symlink! (attributes: 0x%x)\n", dwret);
|
||||
|
||||
/* Delete the symlink as a file */
|
||||
@@ -5080,10 +5080,10 @@ static void test_reparse_points(void)
|
||||
@@ -5203,10 +5203,10 @@ static void test_reparse_points(void)
|
||||
|
||||
/* Create a blank slate for directory symlink tests */
|
||||
bret = CreateDirectoryW(reparse_path, NULL);
|
||||
@@ -224,5 +224,5 @@ index b904bc1f2d..fbd824fd10 100644
|
||||
/* Create the directory symlink */
|
||||
HeapFree(GetProcessHeap(), 0, buffer);
|
||||
--
|
||||
2.17.1
|
||||
2.25.1
|
||||
|
||||
|
Reference in New Issue
Block a user