* path.cc (cwdstuff::get_initial): Keep caching alive.

(mount_info::conv_to_win32_path): Fill out relative path in failing case.
This commit is contained in:
Christopher Faylor 2000-09-06 06:42:08 +00:00
parent f7925ed552
commit b8a0fafe80
2 changed files with 13 additions and 3 deletions

View File

@ -1,3 +1,9 @@
Wed Sep 6 02:40:12 2000 Christopher Faylor <cgf@cygnus.com>
* path.cc (cwdstuff::get_initial): Keep caching alive.
(mount_info::conv_to_win32_path): Fill out relative path in failing
case.
Tue Sep 5 21:36:15 2000 Christopher Faylor <cgf@cygnus.com>
* path.cc (normalize_posix_path): Deal with error return from cygcwd.get.

View File

@ -1048,7 +1048,9 @@ fillin:
if (!cygcwd.get (cwd_win32, 0))
return get_errno ();
unsigned cwdlen = strlen (cwd_win32);
if (path_prefix_p (cwd_win32, dst, cwdlen))
if (!path_prefix_p (cwd_win32, dst, cwdlen))
strcpy (win32_path, dst);
else
{
size_t n = strlen (dst);
if (n < cwdlen)
@ -2885,10 +2887,12 @@ cwdstuff::fixup_after_exec (char *win32_cwd, char *posix_cwd, DWORD hash_cwd)
bool
cwdstuff::get_initial ()
{
lock->acquire ();
DWORD len, dlen;
if (win32)
return 1;
lock->acquire ();
int i;
DWORD len, dlen;
for (i = 0, dlen = MAX_PATH, len = 0; i < 3; dlen *= 2, i++)
{
win32 = (char *) crealloc (win32, dlen + 2);