* cygpath.cc (get_long_name): Load GetLongPathNameA instead of incorrect

GetLongPathName.
	(doit): Create mixed filename after converting to short or long pathname
	respectively.
This commit is contained in:
Corinna Vinschen 2006-02-17 12:17:47 +00:00
parent 32410d2175
commit 4fc92aa730
2 changed files with 10 additions and 3 deletions

View File

@ -1,3 +1,10 @@
2006-02-17 Corinna Vinschen <corinna@vinschen.de>
* cygpath.cc (get_long_name): Load GetLongPathNameA instead of incorrect
GetLongPathName.
(doit): Create mixed filename after converting to short or long pathname
respectively.
2006-02-17 Jerry D. Hedden <jerry@hedden.us>
* ps.cc (main): Set aflag if -p option is given.

View File

@ -234,7 +234,7 @@ get_long_name (const char *filename, DWORD& len)
char *sbuf, buf[MAX_PATH];
static HINSTANCE k32 = LoadLibrary ("kernel32.dll");
static DWORD (WINAPI *GetLongPathName) (LPCSTR, LPSTR, DWORD) =
(DWORD (WINAPI *) (LPCSTR, LPSTR, DWORD)) GetProcAddress (k32, "GetLongPathName");
(DWORD (WINAPI *) (LPCSTR, LPSTR, DWORD)) GetProcAddress (k32, "GetLongPathNameA");
if (!GetLongPathName)
GetLongPathName = get_long_path_name_w32impl;
@ -497,8 +497,6 @@ doit (char *filename)
conv_func = (absolute_flag ? cygwin_conv_to_full_win32_path :
cygwin_conv_to_win32_path);
err = conv_func (filename, buf);
if (mixed_flag)
buf = get_mixed_name (buf);
if (err)
{
fprintf (stderr, "%s: error converting \"%s\" - %s\n",
@ -511,6 +509,8 @@ doit (char *filename)
buf = get_short_name (buf);
if (longname_flag)
buf = get_long_name (buf, len);
if (mixed_flag)
buf = get_mixed_name (buf);
}
}