summaryrefslogtreecommitdiff
path: root/winsup/cygwin/path.cc
diff options
context:
space:
mode:
Diffstat (limited to 'winsup/cygwin/path.cc')
-rw-r--r--winsup/cygwin/path.cc5
1 files changed, 2 insertions, 3 deletions
diff --git a/winsup/cygwin/path.cc b/winsup/cygwin/path.cc
index 5f078726793..ca8f207f77e 100644
--- a/winsup/cygwin/path.cc
+++ b/winsup/cygwin/path.cc
@@ -2360,8 +2360,7 @@ mount (const char *win32_path, const char *posix_path, unsigned flags)
{
int res = -1;
- if (check_null_empty_str_errno (win32_path)
- || check_null_empty_str_errno (posix_path))
+ if (check_null_empty_str_errno (posix_path))
/* errno set */;
else if (strpbrk (posix_path, "\\:"))
set_errno (EINVAL);
@@ -2373,7 +2372,7 @@ 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
+ else if (!check_null_empty_str_errno (win32_path))
res = mount_table->add_item (win32_path, posix_path, flags, TRUE);
syscall_printf ("%d = mount (%s, %s, %p)", res, win32_path, posix_path, flags);