Commit 80917907 authored by James Hawkins's avatar James Hawkins Committed by Alexandre Julliard

Remove the corresponding registry entry when deleting a drive.

parent 34299c76
......@@ -357,6 +357,9 @@ void apply_drive_changes()
}
else if(foundDrive && !drives[i].in_use)
{
HKEY hKey;
char driveValue[256];
/* remove this drive */
if(!DefineDosDevice(DDD_REMOVE_DEFINITION, devicename, drives[i].unixpath))
{
......@@ -369,6 +372,18 @@ void apply_drive_changes()
WINE_TRACE("removed devicename of '%s', targetpath of '%s'\n",
devicename, drives[i].unixpath);
}
retval = RegOpenKey(HKEY_LOCAL_MACHINE, "Software\\Wine\\Drives", &hKey);
if (retval != ERROR_SUCCESS)
{
WINE_TRACE("Unable to open '%s'\n", "Software\\Wine\\Drives");
}
else
{
snprintf(driveValue, sizeof(driveValue), "%c:", toupper(drives[i].letter));
retval = RegDeleteValue(hKey, driveValue);
}
}
else if(drives[i].in_use) /* foundDrive must be false from the above check */
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment