]> sourceware.org Git - newlib-cygwin.git/commitdiff
* path.cc (chdir): Don't set cache to offending chdir. Change comment to
authorChristopher Faylor <me@cgf.cx>
Thu, 15 Jun 2000 22:14:14 +0000 (22:14 +0000)
committerChristopher Faylor <me@cgf.cx>
Thu, 15 Jun 2000 22:14:14 +0000 (22:14 +0000)
reflect current reality.

winsup/cygwin/ChangeLog
winsup/cygwin/path.cc

index 4facd8b4efffbeb9a16f4518071a5fd3df7840ca..a9e3980b0bc1f5f0cf962c6758b05c6f17162289 100644 (file)
@@ -1,3 +1,8 @@
+Thu Jun 15 18:12:36 2000  Christopher Faylor <cgf@cygnus.com>
+
+       * path.cc (chdir): Don't set cache to offending chdir.  Change comment
+       to reflect current reality.
+
 Thu Jun 15 15:43:50 2000  Christopher Faylor <cgf@cygnus.com>
 
        * path.cc (normalize_posix_path): Convert path to POSIX if it seems to
index a74aa0829c5c9251968c3d0a149da695cc2cf05c..4952d4608569715ed205fd78f92fadccf4907f04 100644 (file)
@@ -2467,15 +2467,17 @@ chdir (const char *dir)
   int res = SetCurrentDirectoryA (native_dir) ? 0 : -1;
   if (res == -1)
     __seterrno ();
+  else
+    {
+      /* Store new cache information */
+      free (cwd_win32);
+      cwd_win32 = strdup (path);;
 
-  /* Clear the cache until we need to retrieve the directory again.  */
-  free (cwd_win32);
-  cwd_win32 = strdup (path);;
-
-  char pathbuf[MAX_PATH];
-  (void) normalize_posix_path (cwd_posix, dir, pathbuf);
-  free (cwd_posix);
-  cwd_posix = strdup (pathbuf);
+      char pathbuf[MAX_PATH];
+      (void) normalize_posix_path (cwd_posix, dir, pathbuf);
+      free (cwd_posix);
+      cwd_posix = strdup (pathbuf);
+    }
 
   syscall_printf ("%d = chdir (%s <dos %s>)", res, cwd_posix, cwd_win32);
   return res;
This page took 0.035999 seconds and 5 git commands to generate.