mirror of
git://sourceware.org/git/newlib-cygwin.git
synced 2025-01-19 04:49:25 +08:00
* path.cc (chdir): Don't set cache to offending chdir. Change comment to
reflect current reality.
This commit is contained in:
parent
a9706abaff
commit
3875d9e652
@ -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>
|
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
|
* path.cc (normalize_posix_path): Convert path to POSIX if it seems to
|
||||||
|
@ -2467,15 +2467,17 @@ chdir (const char *dir)
|
|||||||
int res = SetCurrentDirectoryA (native_dir) ? 0 : -1;
|
int res = SetCurrentDirectoryA (native_dir) ? 0 : -1;
|
||||||
if (res == -1)
|
if (res == -1)
|
||||||
__seterrno ();
|
__seterrno ();
|
||||||
|
else
|
||||||
|
{
|
||||||
|
/* Store new cache information */
|
||||||
|
free (cwd_win32);
|
||||||
|
cwd_win32 = strdup (path);;
|
||||||
|
|
||||||
/* Clear the cache until we need to retrieve the directory again. */
|
char pathbuf[MAX_PATH];
|
||||||
free (cwd_win32);
|
(void) normalize_posix_path (cwd_posix, dir, pathbuf);
|
||||||
cwd_win32 = strdup (path);;
|
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);
|
syscall_printf ("%d = chdir (%s <dos %s>)", res, cwd_posix, cwd_win32);
|
||||||
return res;
|
return res;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user