diff options
author | Christopher Faylor <me@cgf.cx> | 2003-06-12 20:40:58 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2003-06-12 20:40:58 +0000 |
commit | cc3ce0bb5f8eeb631ea583400cbc6e286167c589 (patch) | |
tree | 46083f05279528e31b7a488eeb02d0e345db40ce /winsup/utils/cygpath.cc | |
parent | 1c80421cb4233b2aa0a798d8f05f7d313c0bff67 (diff) | |
download | cygnal-cc3ce0bb5f8eeb631ea583400cbc6e286167c589.tar.gz cygnal-cc3ce0bb5f8eeb631ea583400cbc6e286167c589.tar.bz2 cygnal-cc3ce0bb5f8eeb631ea583400cbc6e286167c589.zip |
Throughout, always return error when GetShortPathName returns 0.
Diffstat (limited to 'winsup/utils/cygpath.cc')
-rw-r--r-- | winsup/utils/cygpath.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/winsup/utils/cygpath.cc b/winsup/utils/cygpath.cc index 74f3f660b..9d9c1903f 100644 --- a/winsup/utils/cygpath.cc +++ b/winsup/utils/cygpath.cc @@ -121,7 +121,7 @@ get_short_paths (char *path) if (ptr) *ptr++ = 0; len = GetShortPathName (next, NULL, 0); - if (len == 0 && GetLastError () == ERROR_INVALID_PARAMETER) + if (!len) { fprintf (stderr, "%s: cannot create short name of %s\n", prog_name, next); @@ -139,7 +139,7 @@ get_short_paths (char *path) for (;;) { len = GetShortPathName (ptr, sptr, acc); - if (len == 0 && GetLastError () == ERROR_INVALID_PARAMETER) + if (!len) { fprintf (stderr, "%s: cannot create short name of %s\n", prog_name, ptr); @@ -162,7 +162,7 @@ get_short_name (const char *filename) { char *sbuf, buf[MAX_PATH]; DWORD len = GetShortPathName (filename, buf, MAX_PATH); - if (len == 0 && GetLastError () == ERROR_INVALID_PARAMETER) + if (!len) { fprintf (stderr, "%s: cannot create short name of %s\n", prog_name, filename); |