From 5588e287656755ccf77f8939470c3fde41b7a1d7 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Tue, 14 May 2002 16:07:26 +0000 Subject: [PATCH] * cygpath.cc (get_short_name): Fix error checking. --- winsup/utils/ChangeLog | 4 ++++ winsup/utils/cygpath.cc | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/winsup/utils/ChangeLog b/winsup/utils/ChangeLog index 42f5f0cd3..a6a15fc41 100644 --- a/winsup/utils/ChangeLog +++ b/winsup/utils/ChangeLog @@ -1,3 +1,7 @@ +2002-05-14 Mark Blackburn + + * cygpath.cc (get_short_name): Fix error checking. + 2002-05-13 Joshua Daniel Franklin * kill.cc (prog_name) New global variable. diff --git a/winsup/utils/cygpath.cc b/winsup/utils/cygpath.cc index 1d8215df2..1536ecedc 100644 --- a/winsup/utils/cygpath.cc +++ b/winsup/utils/cygpath.cc @@ -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);