public inbox for cygwin-cvs@sourceware.org
help / color / mirror / Atom feed
* [newlib-cygwin] cygwin_conv_path: Really always preserve trailing slash in conversion to POSIX path
@ 2016-02-15 15:25 Corinna Vinschen
0 siblings, 0 replies; only message in thread
From: Corinna Vinschen @ 2016-02-15 15:25 UTC (permalink / raw)
To: cygwin-cvs
https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=4c59f62ef968d8ac3da12a6aa88b81c45e4e1438
commit 4c59f62ef968d8ac3da12a6aa88b81c45e4e1438
Author: Corinna Vinschen <corinna@vinschen.de>
Date: Mon Feb 15 16:25:10 2016 +0100
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>
Diff:
---
winsup/cygwin/mount.cc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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,
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2016-02-15 15:25 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-15 15:25 [newlib-cygwin] cygwin_conv_path: Really always preserve trailing slash in conversion to POSIX path Corinna Vinschen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).