[Bug 28525] Wine doesn't start Dosbox if $PWD = ~/.wine

wine-bugs at winehq.org wine-bugs at winehq.org
Sun Oct 2 16:49:37 CDT 2011


http://bugs.winehq.org/show_bug.cgi?id=28525

--- Comment #4 from Spammer <spammis at spam.la> 2011-10-02 16:49:37 CDT ---
Does this patch mean that Wine will use the name from GetShortPathNameW even if
Wine can't produce any short file name? Note that the function GetShortPathName
generates something which doesn't look sensible for this directory. I tried
getting the short name several times and I always got different results -- but
the results don't look like real paths and could maybe confuse Dosbox if you
try to CD to the returned values:

user at localhost:~/.wine$ wine path.exe 
D:\.wine
@K&h
user at localhost:~/.wine$ wine path.exe 
D:\.wine
@ï;h
user at localhost:~/.wine$ wine path.exe 
D:\.wine
@╦M|
user at localhost:~/.wine$ wine path.exe 
D:\.wine
@╗&h

Would Wine do "@:" (or maybe even "@╗") when trying to set the directory?
Would Wine try to "cd &h"?

Clarifications:
D: = ~ (mount point set in Wine)
first line = long path (from GetCurrentDirectory)
second line = short path (long path converted using GetShortPathName -- shows
the right path in other directories)
path.exe = program compiled from the following code (using
i586-mingw32msvc-gcc):

#include <stdio.h>
#include <windows.h>
int main(int argc, char *argv[])
{
  char longdirectory[100];
  char shortdirectory[100];
  GetCurrentDirectory(100, shortdirectory);
  GetShortPathName(shortdirectory, longdirectory, 100);
  printf("%s", shortdirectory);
  printf("%s", "\n");
  printf("%s", longdirectory);
  printf("%s", "\n");
  return 0;
}

The same situation (no existing short path for the current directory) may also
occur under Windows (I suppose) since NTFS directories aren't guaranteed to
have short names and since certain UNC paths may refer to files not present on
any DOS drive. For example, short names don't seem to be created on NTFS
partitions if the files or directories are created under Linux. What does
Windows do when this happens? Shouldn't Wine mirror this feature here?

-- 
Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email
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.


More information about the wine-bugs mailing list