From 4863867ab9d6b417d23e22420e8f45264bc83724 Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Thu, 13 Jun 2002 03:04:50 +0000 Subject: * path.cc (chdir): Minor cleanup. --- winsup/cygwin/path.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'winsup/cygwin/path.cc') diff --git a/winsup/cygwin/path.cc b/winsup/cygwin/path.cc index a97c9df3c..cfa3ef241 100644 --- a/winsup/cygwin/path.cc +++ b/winsup/cygwin/path.cc @@ -3240,7 +3240,7 @@ chdir (const char *in_dir) res = 0; } - /* If res < 0, we didn't change to a new directory. + /* If res != 0, we didn't change to a new directory. Otherwise, set the current windows and posix directory cache from input. If the specified directory is a MS-DOS style directory or if the directory was symlinked, convert the MS-DOS path back to posix style. Otherwise just @@ -3250,7 +3250,7 @@ chdir (const char *in_dir) do when we detect a symlink? Should we instead rebuild the posix path from the input by traversing links? This would be an expensive operation but we'll see if Cygwin mailing list users whine about the current behavior. */ - if (res == -1) + if (res) __seterrno (); else if ((!path.has_symlinks () && strpbrk (dir, ":\\") == NULL && pcheck_case == PCHECK_RELAXED) || isvirtual_dev (devn)) -- cgit v1.2.3