diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2006-02-17 12:17:47 +0000 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2006-02-17 12:17:47 +0000 |
commit | 4fc92aa73009d62dfd4590fd296caf4dd1210755 (patch) | |
tree | a544a0832c64d1b42bbb3a75f2a9ba224b448c9a | |
parent | 32410d21752cbfd1afa958682c7b337136160106 (diff) | |
download | newlib-4fc92aa73009d62dfd4590fd296caf4dd1210755.zip newlib-4fc92aa73009d62dfd4590fd296caf4dd1210755.tar.gz newlib-4fc92aa73009d62dfd4590fd296caf4dd1210755.tar.bz2 |
* cygpath.cc (get_long_name): Load GetLongPathNameA instead of incorrect
GetLongPathName.
(doit): Create mixed filename after converting to short or long pathname
respectively.
-rw-r--r-- | winsup/utils/ChangeLog | 7 | ||||
-rw-r--r-- | winsup/utils/cygpath.cc | 6 |
2 files changed, 10 insertions, 3 deletions
diff --git a/winsup/utils/ChangeLog b/winsup/utils/ChangeLog index 17dc14f..723c88d 100644 --- a/winsup/utils/ChangeLog +++ b/winsup/utils/ChangeLog @@ -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. diff --git a/winsup/utils/cygpath.cc b/winsup/utils/cygpath.cc index 6265759..d3e8ba6 100644 --- a/winsup/utils/cygpath.cc +++ b/winsup/utils/cygpath.cc @@ -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); } } |