On 10/24/05, Mike Hearn mike@plan99.net wrote:
if ('A' + i != 'Z')
{
struct drive swapbuf;
/* the root drive must be letter Z for now, the unixfs seems to expect it */
WINE_TRACE("attempting to remap / to drive Z:\n");
/* if Z is already used, we need to swap Z and this drive around */
if (drives['Z' - 'A'].in_use)
{
swapbuf = drives['Z' - 'A'];
drives['Z' - 'A'] = drives[i];
drives[i] = swapbuf;
}
else
{
drives['Z' - 'A'] = drives[i];
drives[i].in_use = FALSE;
}
}
Couldn't we check that Z points to / already before we swap the drives? If Z already points to /, then we would drop the current letter we're adding; otherwise, wouldn't we have two drive letters mapping to /? Besides that point, it looks good to me.
-- James Hawkins
On Tue, 2005-10-25 at 01:33 +0000, James Hawkins wrote:
Couldn't we check that Z points to / already before we swap the drives? If Z already points to /, then we would drop the current letter we're adding; otherwise, wouldn't we have two drive letters mapping to /? Besides that point, it looks good to me.
Yes, good point. Though I think this one missed the boat so we may as well fix the underlying problem, which I guess Michael correctly identified. I thought it was the unixfs as some of the debug output was related to that, but there was quite a lot (cascading failures I guess). The desktop shell folder still having references to Z: in the registry sounds much more likely.