* cygpath.cc (get_short_name): Fix error checking.

This commit is contained in:
Corinna Vinschen 2002-05-14 16:07:26 +00:00
parent ef48a2cad3
commit 5588e28765
2 changed files with 5 additions and 1 deletions

View File

@ -1,3 +1,7 @@
2002-05-14 Mark Blackburn <marklist@fangorn.ca>
* cygpath.cc (get_short_name): Fix error checking.
2002-05-13 Joshua Daniel Franklin <joshuadfranklin@yahoo.com>
* kill.cc (prog_name) New global variable.

View File

@ -90,7 +90,7 @@ get_short_paths (char *path)
if (ptr)
*ptr++ = 0;
len = GetShortPathName (next, NULL, 0);
if (len == ERROR_INVALID_PARAMETER)
if (len ==0 && GetLastError () == ERROR_INVALID_PARAMETER)
{
fprintf (stderr, "%s: cannot create short name of %s\n", prog_name,
next);