-
-
Save qsniyg/ec21d68f9407991a1043a71fa6ffd4cf to your computer and use it in GitHub Desktop.
diff --git a/dlls/kernel32/file.c b/dlls/kernel32/file.c | |
index 2b6a13fc0d..6798ecc8ff 100644 | |
--- a/dlls/kernel32/file.c | |
+++ b/dlls/kernel32/file.c | |
@@ -754,7 +754,7 @@ HANDLE WINAPI FindFirstFileExW( LPCWSTR filename, FINDEX_INFO_LEVELS level, | |
status = NtOpenFile( &info->handle, GENERIC_READ | SYNCHRONIZE, &attr, &io, | |
FILE_SHARE_READ | FILE_SHARE_WRITE, | |
- FILE_DIRECTORY_FILE | FILE_SYNCHRONOUS_IO_NONALERT ); | |
+ FILE_DIRECTORY_FILE | FILE_SYNCHRONOUS_IO_NONALERT | FILE_OPEN_FOR_BACKUP_INTENT ); | |
if (status != STATUS_SUCCESS) | |
{ | |
@@ -801,7 +801,8 @@ HANDLE WINAPI FindFirstFileExW( LPCWSTR filename, FINDEX_INFO_LEVELS level, | |
} | |
info->data_len = io.Information; | |
- if (!has_wildcard || info->data_len < info->data_size - max_entry_size) | |
+ /* Disable this check because USVFS underflows data_len */ | |
+ if (!has_wildcard /*|| info->data_len < info->data_size - max_entry_size*/) | |
{ | |
if (has_wildcard) /* release unused buffer space */ | |
HeapReAlloc( GetProcessHeap(), HEAP_REALLOC_IN_PLACE_ONLY, |
@spudnik1 Correct, although the latest wine (4.17?+) does have the first part of the patch (FILE_OPEN_FOR_BACKUP_INTENT
) already applied, only the second is required.
@spudnik1 Correct, although the latest wine (4.17?+) does have the first part of the patch (
FILE_OPEN_FOR_BACKUP_INTENT
) already applied, only the second is required.
ok, thanks. If you leave the first part in, it should just be ignored while patching, correct?
@spudnik1 I believe it'll return an error unfortunately, so you might just want to patch the second one manually (search for and remove || info->data_len < info->data_size - max_entry_size
in dlls/kernel32/file.c)
Tried proton ge 4.19 which I think is based off wine4.19 and this patch is most definitely not in it. Will it ever be merged upstream or must be manually compile our own wine each time (or in this case the entire proton suite) ??
@jarrard I just sent it now: https://source.winehq.org/patches/data/174348
Ok, could take a while to show up in releases. We will see.
I'll probably see if I can get this vagrant thing working and compile my own proton sometime.
Is this merged? I've recently got back into Linux and am having these identical issues again.
Yes it is, what's the problem you're having?
ModOrganizer2/modorganizer#372
08:38:40.723 [E] failed to hook CopyFile2: No Error (this is just a win10 error, its probably not important and doesn't appear when set to win7)
08:38:40.723 [E] failed to hook NtQueryDirectoryFileEx: No Error
Dotnet48 used, many versions proton-GE testing..
Tested with TKG 6.8, same issue.
Don't know what to think at this point after further testing.. usvfs is just not working for me in any scenario. Perhaps kernel 5.12.6-xanmod1 is to blame...Might wait until some other people do some testing.
So to apply this patch to wine, we save this gist as a file (e.g usvfs.patch), then we cd into the wine source location, then do
patch -p1 < path/to/usvfs.patch
, then build the wine source?