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
Merged with master.
This commit is contained in:
@@ -1,17 +1,18 @@
|
||||
From cc928f1a52250242fd9e3dec8cd159216535f08f Mon Sep 17 00:00:00 2001
|
||||
From 18631ce985f75851cd6f00eb8ff03aa7d3e852ec Mon Sep 17 00:00:00 2001
|
||||
From: "Erich E. Hoover" <erich.e.hoover@gmail.com>
|
||||
Date: Thu, 16 Jan 2014 21:03:47 -0700
|
||||
Subject: kernel32: Advertise junction point support.
|
||||
|
||||
---
|
||||
dlls/kernel32/volume.c | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
dlls/kernel32/volume.c | 3 ++-
|
||||
dlls/ntdll/tests/file.c | 7 +++----
|
||||
2 files changed, 5 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/dlls/kernel32/volume.c b/dlls/kernel32/volume.c
|
||||
index 1509d73..1e3ff7b 100644
|
||||
index d396764..0fb0aef 100644
|
||||
--- a/dlls/kernel32/volume.c
|
||||
+++ b/dlls/kernel32/volume.c
|
||||
@@ -853,7 +853,8 @@ fill_fs_info: /* now fill in the information that depends on the file system ty
|
||||
@@ -854,7 +854,8 @@ fill_fs_info: /* now fill in the information that depends on the file system ty
|
||||
default:
|
||||
if (fsname) lstrcpynW( fsname, ntfsW, fsname_len );
|
||||
if (filename_len) *filename_len = 255;
|
||||
@@ -21,6 +22,24 @@ index 1509d73..1e3ff7b 100644
|
||||
break;
|
||||
}
|
||||
ret = TRUE;
|
||||
diff --git a/dlls/ntdll/tests/file.c b/dlls/ntdll/tests/file.c
|
||||
index acc9197..3112081 100644
|
||||
--- a/dlls/ntdll/tests/file.c
|
||||
+++ b/dlls/ntdll/tests/file.c
|
||||
@@ -2799,10 +2799,9 @@ static void test_junction_points(void)
|
||||
memset(&new_attrib, 0x00, sizeof(new_attrib));
|
||||
dwret = NtQueryInformationFile(hJunction, &iosb, &new_attrib, sizeof(new_attrib), FileBasicInformation);
|
||||
ok(dwret == STATUS_SUCCESS, "Failed to get junction point folder's attributes (0x%x).\n", dwret);
|
||||
- /* conversion bug: we see 0x1c9c380deadbee6 on Wine */
|
||||
- todo_wine ok(old_attrib.LastAccessTime.QuadPart == new_attrib.LastAccessTime.QuadPart,
|
||||
- "Junction point folder's access time does not match (0x%llx != 0x%llx).\n",
|
||||
- new_attrib.LastAccessTime.QuadPart, old_attrib.LastAccessTime.QuadPart);
|
||||
+ ok(old_attrib.LastAccessTime.QuadPart == new_attrib.LastAccessTime.QuadPart,
|
||||
+ "Junction point folder's access time does not match (0x%llx != 0x%llx).\n",
|
||||
+ new_attrib.LastAccessTime.QuadPart, old_attrib.LastAccessTime.QuadPart);
|
||||
CloseHandle(hJunction);
|
||||
|
||||
/* Check deleting a junction point as if it were a directory */
|
||||
--
|
||||
1.7.9.5
|
||||
|
||||
|
||||
@@ -1,69 +0,0 @@
|
||||
From f8bf15e30d5e0b9e30ceb644c07449b7782efb72 Mon Sep 17 00:00:00 2001
|
||||
From: "Erich E. Hoover" <erich.e.hoover@gmail.com>
|
||||
Date: Thu, 16 Jan 2014 21:07:43 -0700
|
||||
Subject: ntdll: Use relative paths for creating links.
|
||||
|
||||
---
|
||||
dlls/ntdll/file.c | 39 +++++++++++++++++++++++++++++++++++++++
|
||||
1 file changed, 39 insertions(+)
|
||||
|
||||
diff --git a/dlls/ntdll/file.c b/dlls/ntdll/file.c
|
||||
index b4e06d1..6907b2b 100644
|
||||
--- a/dlls/ntdll/file.c
|
||||
+++ b/dlls/ntdll/file.c
|
||||
@@ -1487,6 +1487,7 @@ NTSTATUS FILE_CreateSymlink(HANDLE handle, REPARSE_DATA_BUFFER *buffer)
|
||||
int dest_fd, needs_close;
|
||||
UNICODE_STRING nt_dest;
|
||||
NTSTATUS status;
|
||||
+ char *p;
|
||||
|
||||
if ((status = server_get_unix_fd( handle, FILE_SPECIAL_ACCESS, &dest_fd, &needs_close, NULL, NULL )))
|
||||
return status;
|
||||
@@ -1500,6 +1501,44 @@ NTSTATUS FILE_CreateSymlink(HANDLE handle, REPARSE_DATA_BUFFER *buffer)
|
||||
goto cleanup;
|
||||
dest_allocated = TRUE;
|
||||
|
||||
+ p = strstr(unix_src.Buffer, "/dosdevices/");
|
||||
+ if (p)
|
||||
+ {
|
||||
+ int count = -1; /* do not count the slash at the end of dosdevices or the last directory */
|
||||
+
|
||||
+ p += 11; /* strlen("/dosdevices") */
|
||||
+ do
|
||||
+ {
|
||||
+ p++; /* skip the slash */
|
||||
+ count++;
|
||||
+ p = strchr(p, '/');
|
||||
+ } while(p);
|
||||
+ FIXME("found %d directories up.\n", count);
|
||||
+ p = strstr(unix_dest.Buffer, "/dosdevices/");
|
||||
+ if (p)
|
||||
+ {
|
||||
+ ANSI_STRING tmp;
|
||||
+ int dest_len;
|
||||
+ char *d;
|
||||
+
|
||||
+ p += 12; /* strlen("/dosdevices/") */
|
||||
+ dest_len = unix_dest.Length - (p-unix_dest.Buffer) + 1;
|
||||
+ tmp.Length = dest_len + 3*count; /* strlen("../") = 3 */
|
||||
+ tmp.Buffer = RtlAllocateHeap(GetProcessHeap(), 0, tmp.Length);
|
||||
+ d = tmp.Buffer;
|
||||
+ for(; count > 0; count--)
|
||||
+ {
|
||||
+ (d++)[0] = '.';
|
||||
+ (d++)[0] = '.';
|
||||
+ (d++)[0] = '/';
|
||||
+ }
|
||||
+ memcpy(d, p, dest_len);
|
||||
+ RtlFreeAnsiString( &unix_dest );
|
||||
+ unix_dest.Length = tmp.Length;
|
||||
+ unix_dest.Buffer = tmp.Buffer;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
TRACE("Linking %s to %s\n", unix_src.Buffer, unix_dest.Buffer);
|
||||
|
||||
/* Produce the link in a temporary location */
|
||||
--
|
||||
1.7.9.5
|
||||
|
||||
Reference in New Issue
Block a user