[Bug 51209] New: Regression: Wine-mono installers in the parent folder of build trees can not be found

"WineHQ Bugzilla" <[email protected]>
Newsgroups gmane.comp.emulators.wine.bugs
Message-ID <[email protected]/>
https://bugs.winehq.org/show_bug.cgi?id=51209

            Bug ID: 51209
           Summary: Regression: Wine-mono installers in the parent folder
                    of build trees can not be found
           Product: Wine
           Version: 6.9
          Hardware: x86-64
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: -unknown
          Assignee: [email protected]
          Reporter: [email protected]
      Distribution: ---

~$ sha256sum ~/src/mono/wine-mono-6.1.1-x86.msi 
ac3b14beafde34b8482287e597000113dc06a915f32c9fd06c77eb819079e38b 
/home/eric/src/mono/wine-mono-6.1.1-x86.msi

~$ ls -l ~/src/wine/mono 
lrwxrwxrwx 1 eric eric 7 Nov  4  2020 /home/eric/src/wine/mono -> ../mono

The build tree is in ~/src/wine/win32-build

WINEDEBUG=+file bad log
0064:trace:file:GetFileAttributesW
L"\\\\?\\Z:\\home\\eric\\src\\wine\\win32-build\\..\\mono\\wine-mono-6.1.1-x86.msi"
0064:trace:file:RtlDosPathNameToNtPathName_U_WithStatus
(L"\\\\?\\Z:\\home\\eric\\src\\wine\\win32-build\\..\\mono\\wine-mono-6.1.1-x86.msi",0031FBD0,00000000,00000000)
0064:trace:file:nt_to_unix_file_name
L"home\\eric\\src\\wine\\win32-build\\..\\mono\\wine-mono-6.1.1-x86.msi" not
found in /home/eric/.wine/dosdevices/z:€~°)€~0)€~€~
€~°Æ~Ç~@Ç~ð)€~P€~p)€~€Æ~ÀÉ~ðÉ~É~ Ê~PÊ~€Ê~°Ê~àÊ~@Ë~pË~
Ë~Ë~Í~ÀÍ~Ð)€~°×~Ø~ Ø~ÐØ~
0064:warn:file:NtQueryAttributesFile
L"\\??\\Z:\\home\\eric\\src\\wine\\win32-build\\..\\mono\\wine-mono-6.1.1-x86.msi"
not found (c0000033)

WINEDEBUG=+file good log
0064:trace:file:GetFileAttributesW
L"\\\\?\\Z:\\home\\eric\\src\\wine\\win32-build\\..\\mono\\wine-mono-6.1.1-x86.msi"
0064:trace:file:RtlDosPathNameToNtPathName_U_WithStatus
(L"\\\\?\\Z:\\home\\eric\\src\\wine\\win32-build\\..\\mono\\wine-mono-6.1.1-x86.msi",0031FBD0,00000000,00000000)
0064:trace:file:nt_to_unix_file_name
L"\\??\\Z:\\home\\eric\\src\\wine\\win32-build\\..\\mono\\wine-mono-6.1.1-x86.msi"
->
"/home/eric/.wine/dosdevices/z:/home/eric/src/wine/win32-build/../mono/wine-mono-6.1.1-x86.msi"

A bisect points to
405666b736f7e471e301f051cfbe68bcbef7e0f6 is the first bad commit
commit 405666b736f7e471e301f051cfbe68bcbef7e0f6
Author: Alexandre Julliard <[email protected]>
Date:   Tue Apr 13 12:55:59 2021 +0200

    ntdll: Reject NT path names that are not in canonical form.

    Signed-off-by: Alexandre Julliard <[email protected]>

 dlls/ntdll/tests/path.c | 92 +++++++++++++++++++++++++++++++++++++++++++++
 dlls/ntdll/unix/file.c  | 99 ++++++++++++++++++++++++++-----------------------
 2 files changed, 144 insertions(+), 47 deletions(-)

However, 405666b is correct. The root cause is in appwiz.cpl/addon.c
install_from_default_dir() and install_from_dos_file(), which constructs a path
starting with "\\?\" and contains "..". According to 405666b and
GetFileAttributesExW() tests (also applies for GetFileAttributesW()),
"\\\\?\\Z:\\home\\eric\\src\\wine\\win32-build\\..\\mono\\wine-mono-6.1.1-x86.msi"
should be canonicalized before passing it to GetFileAttributesW().

-- 
Do not reply to this email, post in Bugzilla using the
above URL to reply.
You are receiving this mail because:
You are watching all bug changes.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.