* path.cc (mount_info::conv_to_win32_path): Avoid returning error if cygdrive
== '/'. (mount_info::cygdrive_win32_path): Return 0 if invalid cygdrive path.
This commit is contained in:
parent
89ba9b974a
commit
2a50e3df6f
|
@ -1,3 +1,9 @@
|
||||||
|
2001-12-03 Christopher Faylor <cgf@redhat.com>
|
||||||
|
|
||||||
|
* path.cc (mount_info::conv_to_win32_path): Avoid returning error if
|
||||||
|
cygdrive == '/'.
|
||||||
|
(mount_info::cygdrive_win32_path): Return 0 if invalid cygdrive path.
|
||||||
|
|
||||||
2001-11-30 Christopher Faylor <cgf@redhat.com>
|
2001-11-30 Christopher Faylor <cgf@redhat.com>
|
||||||
|
|
||||||
* debug.cc (makethread): Eliminate unneeded function call.
|
* debug.cc (makethread): Eliminate unneeded function call.
|
||||||
|
|
|
@ -44,7 +44,7 @@ details. */
|
||||||
/* The current cygwin version is 1.3.6 */
|
/* The current cygwin version is 1.3.6 */
|
||||||
|
|
||||||
#define CYGWIN_VERSION_DLL_MAJOR 1003
|
#define CYGWIN_VERSION_DLL_MAJOR 1003
|
||||||
#define CYGWIN_VERSION_DLL_MINOR 6
|
#define CYGWIN_VERSION_DLL_MINOR 7
|
||||||
|
|
||||||
/* Major numbers before CYGWIN_VERSION_DLL_EPOCH are
|
/* Major numbers before CYGWIN_VERSION_DLL_EPOCH are
|
||||||
incompatible. */
|
incompatible. */
|
||||||
|
|
|
@ -1389,12 +1389,15 @@ mount_info::conv_to_win32_path (const char *src_path, char *dst,
|
||||||
dst[0] = '\0';
|
dst[0] = '\0';
|
||||||
if (mount_table->cygdrive_len > 1)
|
if (mount_table->cygdrive_len > 1)
|
||||||
devn = FH_CYGDRIVE;
|
devn = FH_CYGDRIVE;
|
||||||
|
goto out;
|
||||||
}
|
}
|
||||||
else if (!cygdrive_win32_path (pathbuf, dst, unit))
|
else if (cygdrive_win32_path (pathbuf, dst, unit))
|
||||||
|
{
|
||||||
|
*flags = cygdrive_flags;
|
||||||
|
goto out;
|
||||||
|
}
|
||||||
|
else if (mount_table->cygdrive_len > 1)
|
||||||
return ENOENT;
|
return ENOENT;
|
||||||
else
|
|
||||||
*flags = cygdrive_flags;
|
|
||||||
goto out;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int chrooted_path_len;
|
int chrooted_path_len;
|
||||||
|
@ -1518,8 +1521,9 @@ mount_info::cygdrive_win32_path (const char *src, char *dst, int& unit)
|
||||||
const char *p = src + cygdrive_len;
|
const char *p = src + cygdrive_len;
|
||||||
if (!isalpha (*p) || (!isdirsep (p[1]) && p[1]))
|
if (!isalpha (*p) || (!isdirsep (p[1]) && p[1]))
|
||||||
{
|
{
|
||||||
res = unit = -1;
|
unit = -1;
|
||||||
dst[0] = '\0';
|
dst[0] = '\0';
|
||||||
|
res = 0;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -1528,9 +1532,10 @@ mount_info::cygdrive_win32_path (const char *src, char *dst, int& unit)
|
||||||
strcpy (dst + 2, p + 1);
|
strcpy (dst + 2, p + 1);
|
||||||
backslashify (dst, dst, !dst[2]);
|
backslashify (dst, dst, !dst[2]);
|
||||||
unit = dst[0];
|
unit = dst[0];
|
||||||
|
res = 1;
|
||||||
}
|
}
|
||||||
debug_printf ("src '%s', dst '%s'", src, dst);
|
debug_printf ("src '%s', dst '%s'", src, dst);
|
||||||
return 1;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* conv_to_posix_path: Ensure src_path is a POSIX path.
|
/* conv_to_posix_path: Ensure src_path is a POSIX path.
|
||||||
|
|
Loading…
Reference in New Issue