mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-06 03:08:19 +00:00
GetLongPathName32A() returns dos format long filename instead of unix
format.
This commit is contained in:
parent
b600ac0f77
commit
c1190fe2b4
|
@ -886,11 +886,27 @@ DWORD WINAPI GetLongPathName32A( LPCSTR shortpath, LPSTR longpath,
|
||||||
DWORD longlen )
|
DWORD longlen )
|
||||||
{
|
{
|
||||||
DOS_FULL_NAME full_name;
|
DOS_FULL_NAME full_name;
|
||||||
|
char *p;
|
||||||
/* FIXME: Is it correct to return a UNIX style path here? */
|
char *longfilename;
|
||||||
|
DWORD shortpathlen;
|
||||||
|
|
||||||
if (!DOSFS_GetFullName( shortpath, TRUE, &full_name )) return 0;
|
if (!DOSFS_GetFullName( shortpath, TRUE, &full_name )) return 0;
|
||||||
lstrcpyn32A( longpath, full_name.long_name, longlen );
|
lstrcpyn32A( longpath, full_name.short_name, longlen );
|
||||||
return strlen( full_name.long_name );
|
/* Do some hackery to get the long filename.
|
||||||
|
* FIXME: Would be better if it returned the
|
||||||
|
* long version of the directories too
|
||||||
|
*/
|
||||||
|
longfilename = strrchr(full_name.long_name, '/')+1;
|
||||||
|
if (longpath != NULL) {
|
||||||
|
if ((p = strrchr( longpath, '\\' )) != NULL) {
|
||||||
|
p++;
|
||||||
|
longlen -= (p-longpath);
|
||||||
|
lstrcpyn32A( p, longfilename , longlen);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
shortpathlen =
|
||||||
|
((strrchr( full_name.short_name, '\\' ) - full_name.short_name) + 1);
|
||||||
|
return shortpathlen + strlen( longfilename );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue