https://bugs.winehq.org/show_bug.cgi?id=44721
Bug ID: 44721 Summary: GetFullPathName return path Product: Wine Version: 3.3 Hardware: x86 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: kernel32 Assignee: wine-bugs@winehq.org Reporter: markau0@lycos.com Distribution: ---
I ran the GetFullPathName code example from the Microsoft site https://msdn.microsoft.com/en-us/library/windows/desktop/aa364963(v=vs.85).a...
and Vista returns
The full path name is: c:\windows\notepad.exe The short name for c:\longdirectoryname is c:\LONGDI~1 The long name for c:\LONGDI~1 is c:\longdirectoryname
and Wine 3.3 returns
The full path name is: c:\windowsnotepad.exe The short name for c:\longdirectoryname is c:\LONG~TX4 The long name for c:\LONG~TX4 is c:\longdirectoryname
The full path name is: c:\windows\notepad.exe
The full path name is: c:\windowsnotepad.exe
do not seem to match.
https://bugs.winehq.org/show_bug.cgi?id=44721
--- Comment #1 from Stan markau0@lycos.com --- I used
c:\windows\notepad.exe for the command line argument
https://bugs.winehq.org/show_bug.cgi?id=44721
--- Comment #2 from Stan markau0@lycos.com --- If I use c:\windows\notepad.exe for the command line argument with Wine 3.3 then the output is
The full path name is: c:\windowsnotepad.exe
If I use c:\windows\notepad.exe for the command line argument with Wine 3.3 then the output is
The full path name is: c:\windows\notepad.exe
If I use c:/windows/notepad.exe for the command line argument with Wine 3.3
The full path name is: c:\windows\notepad.exe
backslash-double backslash-forward slash, different results.
The return values on Vista are
The full path name is: c:\windows\notepad.exe
for
command line arguments
c:\windows\notepad.exe
c:\windows\notepad.exe
c:/windows/notepad.exe
https://bugs.winehq.org/show_bug.cgi?id=44721
--- Comment #3 from Stan markau0@lycos.com ---
From debugging it seems like a command line argument parse error.
The c:\windows\notepad.exe command line argument is getting passed to GetFullPathName as c:windowsnotepad.exe where the single backslash \ characters are parsed out by the command line parser before it reaches the GetFullPathName function (or any function for that matter).
https://bugs.winehq.org/show_bug.cgi?id=44721
Fabian Maurer dark.shadow4@web.de changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |dark.shadow4@web.de Ever confirmed|0 |1 Status|UNCONFIRMED |NEEDINFO
--- Comment #4 from Fabian Maurer dark.shadow4@web.de --- Can't reproduce the error. How do you call the program, from bash? Then that might be to blame, not wine.
https://bugs.winehq.org/show_bug.cgi?id=44721
--- Comment #5 from Stan markau0@lycos.com --- (In reply to Fabian Maurer from comment #4)
Can't reproduce the error. How do you call the program, from bash? Then that might be to blame, not wine.
Yes, from bash.
It's probably bash doing it then.
https://bugs.winehq.org/show_bug.cgi?id=44721
tokktokk fdsfgs@krutt.org changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |fdsfgs@krutt.org
https://bugs.winehq.org/show_bug.cgi?id=44721
joaopa jeremielapuree@yahoo.fr changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |jeremielapuree@yahoo.fr
--- Comment #6 from joaopa jeremielapuree@yahoo.fr --- So, is this bug INVALID?
http://bugs.winehq.org/show_bug.cgi?id=44721
--- Comment #7 from Janne janne.kekkonen@gmail.com --- Tested with wine 10.6 (Staging). There seems to be some issues.
Example code was compiled with gcc version 14.2.0 (Rev2, Built by MSYS2 project) WINEDEBUG=-all, was used to suppress fixme messages.
wine --version
wine-10.6 (Staging)
WINEDEBUG=-all wine a.exe c:\temp\bug-44721\a.exe
The full path name is: C:\temp\bug-44721\tempbug-44721a.exe The short name for c:\longdirectoryname is c:\LONG~TX4 The long name for c:\LONG~TX4 is c:\longdirectoryname
and with non existing path & filename output is like this:
wine --version
wine-10.6 (Staging)
WINEDEBUG=-all wine a.exe c:\a\b\c\d\e.exe
The full path name is: C:\temp\bug-44721\abcde.exe The short name for c:\longdirectoryname is c:\LONG~TX4 The long name for c:\LONG~TX4 is c:\longdirectoryname
On Windows 11 above examples look like this:
D:\temp\bug-44721>a.exe d:\temp\bug-44721\a.exe The full path name is: d:\temp\bug-44721\a.exe The short name for c:\longdirectoryname is c:\LONGDI~1 The long name for c:\LONGDI~1 is c:\longdirectoryname
D:\temp\bug-44721>a.exe c:\a\b\d\d\e.exe The full path name is: c:\a\b\d\d\e.exe The short name for c:\longdirectoryname is c:\LONGDI~1 The long name for c:\LONGDI~1 is c:\longdirectoryname
D:\temp\bug-44721>
http://bugs.winehq.org/show_bug.cgi?id=44721
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEEDINFO |RESOLVED Resolution|--- |INVALID
--- Comment #8 from Alexandre Julliard julliard@winehq.org --- You need to escape backslashes for the Unix shell, or try the command from the Wine cmd.exe prompt.
http://bugs.winehq.org/show_bug.cgi?id=44721
Janne janne.kekkonen@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |janne.kekkonen@gmail.com
--- Comment #9 from Janne janne.kekkonen@gmail.com --- Tries with escaped backslashes and running example from cmd.exe. Both situations are working.
WINEDEBUG=-all wine a.exe c:\temp\bug-44721\a.exe
The full path name is: c:\temp\bug-44721\a.exe The short name for c:\longdirectoryname is c:\LONG~TX4 The long name for c:\LONG~TX4 is c:\longdirectoryname
WINEDEBUG=-all wine a.exe c:\a\b\c\d\e.exe
The full path name is: c:\a\b\c\d\e.exe The short name for c:\longdirectoryname is c:\LONG~TX4 The long name for c:\LONG~TX4 is c:\longdirectoryname
WINEDEBUG=-all wine cmd.exe
Microsoft Windows 5.0.2195
C:\temp\bug-44721>a.exe c:\temp\bug-44721\a.exe The full path name is: c:\temp\bug-44721\a.exe The short name for c:\longdirectoryname is c:\LONG~TX4 The long name for c:\LONG~TX4 is c:\longdirectoryname
C:\temp\bug-44721>a.exe c:\a\b\c\d\e.exe The full path name is: c:\a\b\c\d\e.exe The short name for c:\longdirectoryname is c:\LONG~TX4 The long name for c:\LONG~TX4 is c:\longdirectoryname
wine --version
wine-10.6 (Staging)
http://bugs.winehq.org/show_bug.cgi?id=44721
Janne janne.kekkonen@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC|janne.kekkonen@gmail.com |