diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2016-02-15 16:25:10 +0100 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2016-02-15 16:25:10 +0100 |
commit | 4c59f62ef968d8ac3da12a6aa88b81c45e4e1438 (patch) | |
tree | 4aed3af99ea05cd4bd1d4d40ee12f588adf4e732 /winsup/cygwin/mount.cc | |
parent | 7eb13b33e48d3e3299eed8214188aa022f81e091 (diff) | |
download | newlib-4c59f62ef968d8ac3da12a6aa88b81c45e4e1438.zip newlib-4c59f62ef968d8ac3da12a6aa88b81c45e4e1438.tar.gz newlib-4c59f62ef968d8ac3da12a6aa88b81c45e4e1438.tar.bz2 |
cygwin_conv_path: Really always preserve trailing slash in conversion to POSIX path
* mount.cc (mount_info::conv_to_posix_path): Account for scenarios
where the path is identical to a mount point in terms of preserving
the trailing slash in the output.
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
Diffstat (limited to 'winsup/cygwin/mount.cc')
-rw-r--r-- | winsup/cygwin/mount.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/winsup/cygwin/mount.cc b/winsup/cygwin/mount.cc index 961d34b..ece8745 100644 --- a/winsup/cygwin/mount.cc +++ b/winsup/cygwin/mount.cc @@ -959,7 +959,7 @@ mount_info::conv_to_posix_path (const char *src_path, char *posix_path, if ((mi.posix_pathlen + (pathbuflen - mi.native_pathlen) + addslash) >= NT_MAX_PATH) return ENAMETOOLONG; strcpy (posix_path, mi.posix_path); - if (addslash) + if (addslash || (!nextchar && append_slash)) strcat (posix_path, "/"); if (nextchar) slashify (p, |