* mount.cc (mount_info::cygdrive_win32_path): Always upper case

DOS drive letter to accommodate case sensitivity.
	(cygdrive_getmntent): Ditto.
	* path.cc (path_conv::check): Invalidate wide_path after making path
	relative.
This commit is contained in:
Corinna Vinschen 2008-11-11 11:45:05 +00:00
parent 9df1dbeac6
commit 2348e4f3c6
3 changed files with 19 additions and 3 deletions

View File

@ -1,3 +1,11 @@
2008-11-11 Corinna Vinschen <corinna@vinschen.de>
* mount.cc (mount_info::cygdrive_win32_path): Always upper case
DOS drive letter to accommodate case sensitivity.
(cygdrive_getmntent): Ditto.
* path.cc (path_conv::check): Invalidate wide_path after making path
relative.
2008-11-11 Corinna Vinschen <corinna@vinschen.de> 2008-11-11 Corinna Vinschen <corinna@vinschen.de>
* environ.cc (create_upcaseenv): New static variable. * environ.cc (create_upcaseenv): New static variable.

View File

@ -403,7 +403,8 @@ mount_info::cygdrive_win32_path (const char *src, char *dst, int& unit)
} }
else else
{ {
dst[0] = cyg_tolower (*p); /* drive letter must always be uppercase for casesensitive native NT. */
dst[0] = cyg_toupper (*p);
dst[1] = ':'; dst[1] = ':';
strcpy (dst + 2, p + 1); strcpy (dst + 2, p + 1);
backslashify (dst, dst, !dst[2]); backslashify (dst, dst, !dst[2]);
@ -1211,7 +1212,7 @@ cygdrive_getmntent ()
if (_my_tls.locals.available_drives & mask) if (_my_tls.locals.available_drives & mask)
break; break;
__small_sprintf (native_path, "%c:\\", drive); __small_sprintf (native_path, "%c:\\", cyg_toupper (drive));
if (GetFileAttributes (native_path) == INVALID_FILE_ATTRIBUTES) if (GetFileAttributes (native_path) == INVALID_FILE_ATTRIBUTES)
{ {
_my_tls.locals.available_drives &= ~mask; _my_tls.locals.available_drives &= ~mask;

View File

@ -1231,7 +1231,14 @@ out:
if (opt & PC_NOFULL) if (opt & PC_NOFULL)
{ {
if (is_relpath) if (is_relpath)
mkrelpath (this->path, !!caseinsensitive); {
mkrelpath (this->path, !!caseinsensitive);
/* Invalidate wide_path so that wide relpath can be created
in later calls to get_nt_native_path or get_wide_win32_path. */
if (wide_path)
cfree (wide_path);
wide_path = NULL;
}
if (need_directory) if (need_directory)
{ {
size_t n = strlen (this->path); size_t n = strlen (this->path);