summaryrefslogtreecommitdiffstats
path: root/winsup/utils/path.cc
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2009-11-04 17:09:32 +0000
committerCorinna Vinschen <corinna@vinschen.de>2009-11-04 17:09:32 +0000
commit13e8e14ab58d253ec205634a78958b97e7d42f44 (patch)
tree8fdd17e5be0eefbe29f4b545c3ac440765c7f9a9 /winsup/utils/path.cc
parentb5f48aa96165f6f18f4f5c2b337171c626c6b423 (diff)
downloadcygnal-13e8e14ab58d253ec205634a78958b97e7d42f44.tar.gz
cygnal-13e8e14ab58d253ec205634a78958b97e7d42f44.tar.bz2
cygnal-13e8e14ab58d253ec205634a78958b97e7d42f44.zip
* path.cc (read_mounts): Skip unnecessary test if path has been
fetched from loaded cygwin1.dll.
Diffstat (limited to 'winsup/utils/path.cc')
-rw-r--r--winsup/utils/path.cc16
1 files changed, 10 insertions, 6 deletions
diff --git a/winsup/utils/path.cc b/winsup/utils/path.cc
index 34001f057..0360119dd 100644
--- a/winsup/utils/path.cc
+++ b/winsup/utils/path.cc
@@ -594,12 +594,16 @@ read_mounts ()
path_end = wcsrchr (path, L'\\');
if (path_end)
{
- wcscpy (path_end, L"\\cygwin1.dll");
- DWORD attr = GetFileAttributesW (path);
- if (attr == (DWORD) -1
- || (attr & (FILE_ATTRIBUTE_DIRECTORY | FILE_ATTRIBUTE_REPARSE_POINT)))
- path_end = NULL;
- else
+ if (!cygwin_dll_path[0])
+ {
+ wcscpy (path_end, L"\\cygwin1.dll");
+ DWORD attr = GetFileAttributesW (path);
+ if (attr == (DWORD) -1
+ || (attr & (FILE_ATTRIBUTE_DIRECTORY
+ | FILE_ATTRIBUTE_REPARSE_POINT)))
+ path_end = NULL;
+ }
+ if (path_end)
{
*path_end = L'\0';
path_end = wcsrchr (path, L'\\');