Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 2.1.1, 2.1.2, and tip

stable shellext: additionally use GetDriveType for local disks check (closes #842)

Changeset 9d58ecd48e43

Parent eb890e5a314e

by Adrian Buehlmann

Changes to one file · Browse files at 9d58ecd48e43 Showing diff from parent eb890e5a314e Diff from another changeset...

 
45
46
47
48
49
50
 
 
 
 
 
 
 
 
 
 
 
 
 
51
52
53
 
45
46
47
 
 
 
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
@@ -45,9 +45,19 @@
    std::string path = WideToMultibyte(lowerpath.c_str());   - if (GetRegistryConfig("LocalDisksOnly", cval) != 0 && cval != "0" - && PathIsNetworkPath(path.c_str())) - return S_FALSE; + if (GetRegistryConfig("LocalDisksOnly", cval) != 0 && cval != "0") + { + if (::PathIsNetworkPath(path.c_str())) + return S_FALSE; + + if (path.size() > 2 && path[1] == ':') + { + std::string t = "C:\\"; + t[0] = path[0]; + if (::GetDriveType(t.c_str()) == 4) + return S_FALSE; + } + }     char filterStatus = 0;   if (myTortoiseClass == 'A')