diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2007-08-19 19:55:06 +0400 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2007-08-19 19:55:06 +0400 |
commit | decbb5d3873df73f9a7e93f2be1edd248d329d3f (patch) | |
tree | 654dcd4a3ae74443be019f21a0cb6c556e35277f /winsup/cygwin/path.cc | |
parent | fcc5fef0b048ebfa14126a3949190fa174423507 (diff) |
* path.cc (fillout_mntent): Append backslash to drive-only paths before
calling fs_info::update.
* path.h (fs_info::clear): Simplify.
(fs_info::fs_info): Add constructor.
Diffstat (limited to 'winsup/cygwin/path.cc')
-rw-r--r-- | winsup/cygwin/path.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/winsup/cygwin/path.cc b/winsup/cygwin/path.cc index 953efce42..e3377a069 100644 --- a/winsup/cygwin/path.cc +++ b/winsup/cygwin/path.cc @@ -2596,6 +2596,7 @@ static mntent * fillout_mntent (const char *native_path, const char *posix_path, unsigned flags) { struct mntent& ret=_my_tls.locals.mntbuf; + bool append_bs = false; /* Remove drivenum from list if we see a x: style path */ if (strlen (native_path) == 2 && native_path[1] == ':') @@ -2603,6 +2604,7 @@ fillout_mntent (const char *native_path, const char *posix_path, unsigned flags) int drivenum = cyg_tolower (native_path[0]) - 'a'; if (drivenum >= 0 && drivenum <= 31) _my_tls.locals.available_drives &= ~(1 << drivenum); + append_bs = true; } /* Pass back pointers to mount_table strings reserved for use by @@ -2625,6 +2627,8 @@ fillout_mntent (const char *native_path, const char *posix_path, unsigned flags) size_t size = (strlen (native_path) + 10) * sizeof (WCHAR); RtlInitEmptyUnicodeString (&unat, (PWSTR) alloca (size), size); get_nt_native_path (native_path, unat); + if (append_bs) + RtlAppendUnicodeToString (&unat, L"\\"); mntinfo.update (&unat, true); /* this pulls from a cache, usually. */ if (mntinfo.is_samba()) |