cygwin_conv_path: Always preserve trailing backslashes in conversion to POSIX paths
* include/sys/cygwin.h (CCP_CONVFLAGS_MASK): Define. * mount.h (__CCP_APP_SLASH): Define. * mount.cc (mount_info::conv_to_posix_path): Handle __CCP_APP_SLASH flag. * path.cc (cygwin_conv_path): Use CCP_CONVFLAGS_MASK to evaluate "how" flag values. Always add __CCP_APP_SLASH flag when calling mount_info::conv_to_posix_path. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
This commit is contained in:
@@ -899,7 +899,8 @@ mount_info::conv_to_posix_path (const char *src_path, char *posix_path,
|
||||
else
|
||||
{
|
||||
const char *lastchar = src_path + src_path_len - 1;
|
||||
append_slash = isdirsep (*lastchar) && lastchar[-1] != ':';
|
||||
append_slash = isdirsep (*lastchar)
|
||||
&& ((ccp_flags & __CCP_APP_SLASH) || lastchar[-1] != ':');
|
||||
}
|
||||
|
||||
debug_printf ("conv_to_posix_path (%s, 0x%x, %s)", src_path, ccp_flags,
|
||||
|
Reference in New Issue
Block a user