summaryrefslogtreecommitdiffstats
path: root/winsup/utils/cygpath.cc
diff options
context:
space:
mode:
Diffstat (limited to 'winsup/utils/cygpath.cc')
-rw-r--r--winsup/utils/cygpath.cc2
1 files changed, 1 insertions, 1 deletions
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);