Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/winsup
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2000-09-06 10:42:08 +0400
committerChristopher Faylor <me@cgf.cx>2000-09-06 10:42:08 +0400
commitb8a0fafe80e99063154f2d373beca27e398274c0 (patch)
tree753f44df4f72323ab77a29fd5a32008acce5217c /winsup
parentf7925ed5522b683b7c400800ac7da870d1fb01ca (diff)
* path.cc (cwdstuff::get_initial): Keep caching alive.
(mount_info::conv_to_win32_path): Fill out relative path in failing case.
Diffstat (limited to 'winsup')
-rw-r--r--winsup/cygwin/ChangeLog6
-rw-r--r--winsup/cygwin/path.cc10
2 files changed, 13 insertions, 3 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index 4df56a562..1f8a62501 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -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.
diff --git a/winsup/cygwin/path.cc b/winsup/cygwin/path.cc
index 705603cc7..f322a6fa7 100644
--- a/winsup/cygwin/path.cc
+++ b/winsup/cygwin/path.cc
@@ -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);