diff options
author | Christopher Faylor <me@cgf.cx> | 2005-07-09 17:15:38 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2005-07-09 17:15:38 +0000 |
commit | f79359a5bc7354bb973396d3592e7b378fea59c1 (patch) | |
tree | ee142bfe47711fc3e083522aafe5e1acba7c4ecb | |
parent | 4cc9a82e3ef3e785c720133b737c3713e6582b62 (diff) | |
download | newlib-f79359a5bc7354bb973396d3592e7b378fea59c1.zip newlib-f79359a5bc7354bb973396d3592e7b378fea59c1.tar.gz newlib-f79359a5bc7354bb973396d3592e7b378fea59c1.tar.bz2 |
* path.cc (mount): Only check win32_path when we know we need it.
-rw-r--r-- | winsup/cygwin/ChangeLog | 4 | ||||
-rw-r--r-- | winsup/cygwin/path.cc | 4 |
2 files changed, 7 insertions, 1 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index f49a641..edcad89 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,7 @@ +2005-07-09 Christopher Faylor <cgf@timesys.com> + + * path.cc (mount): Only check win32_path when we know we need it. + 2005-07-09 Nicholas Wourms <nwourms@gmail.com> * cygwin.din (getline): Export. diff --git a/winsup/cygwin/path.cc b/winsup/cygwin/path.cc index c62d702..2a5ca46 100644 --- a/winsup/cygwin/path.cc +++ b/winsup/cygwin/path.cc @@ -2486,7 +2486,7 @@ mount (const char *win32_path, const char *posix_path, unsigned flags) myfault efault; if (efault.faulted (EFAULT)) /* errno set */; - else if (!*posix_path || !*win32_path) + else if (!*posix_path) set_errno (EINVAL); else if (strpbrk (posix_path, "\\:")) set_errno (EINVAL); @@ -2498,6 +2498,8 @@ mount (const char *win32_path, const char *posix_path, unsigned flags) res = mount_table->write_cygdrive_info_to_registry (posix_path, flags); win32_path = NULL; } + else if (!*win32_path) + set_errno (EINVAL); else res = mount_table->add_item (win32_path, posix_path, flags, true); |