summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/path.cc
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2004-05-07 03:27:37 +0000
committerChristopher Faylor <me@cgf.cx>2004-05-07 03:27:37 +0000
commit1940656ab9b257cb9944bd0073103aaeea73573a (patch)
treeaa3ed9251ad2905d335927353ce772b959f60fdd /winsup/cygwin/path.cc
parent718123fadad1b1e334f8c1a01db7313156ffe4e2 (diff)
downloadcygnal-1940656ab9b257cb9944bd0073103aaeea73573a.tar.gz
cygnal-1940656ab9b257cb9944bd0073103aaeea73573a.tar.bz2
cygnal-1940656ab9b257cb9944bd0073103aaeea73573a.zip
Christopher Faylor <cgf@timesys.com>
* path.cc (mount_info::conv_to_posix_path): Add return.
Diffstat (limited to 'winsup/cygwin/path.cc')
-rw-r--r--winsup/cygwin/path.cc7
1 files changed, 4 insertions, 3 deletions
diff --git a/winsup/cygwin/path.cc b/winsup/cygwin/path.cc
index 8f85f13be..d40b40f54 100644
--- a/winsup/cygwin/path.cc
+++ b/winsup/cygwin/path.cc
@@ -1693,7 +1693,9 @@ mount_info::conv_to_posix_path (const char *src_path, char *posix_path,
if (!cygheap->root.exists ())
/* nothing */;
- else if (cygheap->root.ischroot_native (pathbuf))
+ else if (!cygheap->root.ischroot_native (pathbuf))
+ return ENOENT;
+ else
{
const char *p = pathbuf + cygheap->root.native_length ();
if (*p)
@@ -1703,9 +1705,8 @@ mount_info::conv_to_posix_path (const char *src_path, char *posix_path,
posix_path[0] = '/';
posix_path[1] = '\0';
}
+ goto out;
}
- else
- return ENOENT;
/* Not in the database. This should [theoretically] only happen if either
the path begins with //, or / isn't mounted, or the path has a drive