summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2001-05-01 04:45:19 +0000
committerChristopher Faylor <me@cgf.cx>2001-05-01 04:45:19 +0000
commitbeab320f33c85ae95b4167dd8c5cda760bcd2393 (patch)
tree199308949decae7554a68f3c440da8bdc659e41f
parentd3c7e9de2823e072732fb9598502c4ebd2a1d0fb (diff)
downloadcygnal-beab320f33c85ae95b4167dd8c5cda760bcd2393.tar.gz
cygnal-beab320f33c85ae95b4167dd8c5cda760bcd2393.tar.bz2
cygnal-beab320f33c85ae95b4167dd8c5cda760bcd2393.zip
* path.cc (mount_info::conv_to_win32_path): Fix debugging output to avoid a
SIGSEGV. Avoid double backslashes in middle of filename.
-rw-r--r--winsup/cygwin/ChangeLog5
-rw-r--r--winsup/cygwin/path.cc4
2 files changed, 7 insertions, 2 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index e7fe482b9..396245072 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,3 +1,8 @@
+Tue May 1 00:34:46 2001 Christopher Faylor <cgf@cygnus.com>
+
+ * path.cc (mount_info::conv_to_win32_path): Fix debugging output to
+ avoid a SIGSEGV. Avoid double backslashes in middle of filename.
+
Mon Apr 30 21:51:14 2001 Christopher Faylor <cgf@cygnus.com>
* path.cc (mkrelpath): New function.
diff --git a/winsup/cygwin/path.cc b/winsup/cygwin/path.cc
index 0d5f1dca6..07ea32161 100644
--- a/winsup/cygwin/path.cc
+++ b/winsup/cygwin/path.cc
@@ -1242,7 +1242,7 @@ mount_info::conv_to_win32_path (const char *src_path, char *dst,
int n = mi->native_pathlen;
memcpy (dst, mi->native_path, n + 1);
char *p = pathbuf + mi->posix_pathlen;
- if ((isdrive (dst) && !dst[2]) || (p && dst[n - 1] != '\\'))
+ if ((isdrive (dst) && !dst[2]) || (*p && dst[n - 1] != '\\'))
dst[n++] = '\\';
strcpy (dst + n, p);
backslashify (dst, dst, 0);
@@ -1251,7 +1251,7 @@ mount_info::conv_to_win32_path (const char *src_path, char *dst,
out:
MALLOC_CHECK;
- debug_printf ("src_path %s, win32 %s, flags %p", dst, *flags, src_path);
+ debug_printf ("src_path %s, dst %s, flags %p", src_path, dst, *flags);
return 0;
}