[PATCH] [RFC] Make drive C always a "Local disk"

Ben Klein shacklein at gmail.com
Sat Mar 7 18:18:20 CST 2009


This patch should fix 17619 for new wineprefixes and other cases where C: is
created. The logic is that C: should never be registered as a network share,
which is the issue in 17619. It was suggested as a response to a previous patch
that this should be relative to %SYSTEM% or something along those lines, but I
believe that C: is a true special case, similar to how A: and B: are always
reserved for floppy drives.

I'm not sure if this is the right way to go, so I'd like comments :) Thanks
-------------- next part --------------
From 5bdf77a254e7a18f3eed124caa10d73b48b29a0b Mon Sep 17 00:00:00 2001
From: Ben Klein <shacklein at gmail.com>
Date: Sun, 8 Mar 2009 11:09:23 +1100
Subject: Make drive C always a "Local disk"

This patch should fix 17619 for new wineprefixes and other cases where C: is
created. The logic is that C: should never be registered as a network share,
which is the issue in 17619. It was suggested as a response to a previous patch
that this should be relative to %SYSTEM% or something along those lines, but I
believe that C: is a true special case, similar to how A: and B: are always
reserved for floppy drives.
---
 dlls/mountmgr.sys/mountmgr.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/dlls/mountmgr.sys/mountmgr.c b/dlls/mountmgr.sys/mountmgr.c
index 00112b9..6ede7eb 100644
--- a/dlls/mountmgr.sys/mountmgr.c
+++ b/dlls/mountmgr.sys/mountmgr.c
@@ -254,7 +254,7 @@ static NTSTATUS define_unix_drive( const void *in_buff, SIZE_T insize )
 
     if (input->type != DRIVE_NO_ROOT_DIR)
     {
-        enum device_type type = DEVICE_UNKNOWN;
+        enum device_type type = (letter == c) ? DEVICE_FIXED : DEVICE_UNKNOWN;
 
         TRACE( "defining %c: dev %s mount %s type %u\n",
                letter, debugstr_a(device), debugstr_a(mount_point), input->type );
-- 
1.6.1.3


More information about the wine-patches mailing list