* fhandler_netdrive.cc (fhandler_netdrive::exists): Assert that "//" exists.

This commit is contained in:
Christopher Faylor 2005-05-13 13:23:38 +00:00
parent 66582dd6e7
commit eb6cd95fec
2 changed files with 9 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2005-05-13 Christopher Faylor <cgf@timesys.com>
* fhandler_netdrive.cc (fhandler_netdrive::exists): Assert that "//"
exists.
2005-05-12 Christopher Faylor <cgf@timesys.com>
* cygtls.cc (_cygtls::remove): Eliminate compiler warning.

View File

@ -29,7 +29,10 @@ fhandler_netdrive::exists ()
{
char *to;
const char *from;
char namebuf[strlen (get_name ()) + 1];
size_t len = strlen (get_name ());
if (len == 2)
return 1;
char namebuf[len + 1];
for (to = namebuf, from = get_name (); *from; to++, from++)
*to = (*from == '/') ? '\\' : *from;
*to = '\0';