View Issue Details

IDProjectCategoryView StatusLast Update
0001277Double CommanderDefaultpublic2020-06-19 21:52
Reporterrasto.bihari Assigned ToAlexx2000  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
ProjectionnoneETAnone 
Product Version0.7.0 (trunk) 
Target Version0.7.0Fixed in Version0.7.0 
Summary0001277: Not all disconnected network drives listed in drive list
DescriptionWhen having sequence of disconnected network drives (e.g. W,X,Y,Z) only every other (W,Y) is listed in drive list.
TagsNo tags attached.
Attached Files
udrivewatcher.pas.patch (880 bytes)   
Index: src/platform/udrivewatcher.pas
===================================================================
--- src/platform/udrivewatcher.pas	(revision 6487)
+++ src/platform/udrivewatcher.pas	(working copy)
@@ -442,7 +442,7 @@
   Key: HKEY;
   RegDrivePath: UnicodeString;
   NetworkPath: array[0..Pred(MAX_PATH)] of WideChar;
-  NetworkPathSize: DWORD = MAX_PATH * SizeOf(WideChar);
+  NetworkPathSize: DWORD;
 begin
   Result := TDrivesList.Create;
   { fill list }
@@ -456,6 +456,7 @@
       RegDrivePath := 'Network' + PathDelim + DriveLetter;
       if RegOpenKeyExW(HKEY_CURRENT_USER, PWideChar(RegDrivePath), 0, KEY_READ, Key) = ERROR_SUCCESS then
       begin
+        NetworkPathSize := MAX_PATH * SizeOf(WideChar);
         if RegQueryValueExW(Key, 'RemotePath', nil, nil, @NetworkPath, @NetworkPathSize) = ERROR_SUCCESS then
         begin
           New(Drive);
udrivewatcher.pas.patch (880 bytes)   
Fixed in Revision6495
Operating systemWindows
Widgetset
Architecture

Activities

rasto.bihari

2016-01-17 03:36

reporter   ~0001632

Problem is in file ./platform/udrivewatcher.pas in function TDriveWatcher.GetDrivesList. Variable NetworkPathSize should be initialized to 'size' of NetworkPath before each call of RegQueryValueExW(Key, 'RemotePath', nil, nil, @NetworkPath, @NetworkPathSize). See attached patch file.

Issue History

Date Modified Username Field Change
2016-01-17 03:05 rasto.bihari New Issue
2016-01-17 03:33 rasto.bihari File Added: udrivewatcher.pas.patch
2016-01-17 03:36 rasto.bihari Note Added: 0001632
2016-01-17 21:33 Alexx2000 Fixed in Revision => 6495
2016-01-17 21:33 Alexx2000 Assigned To => Alexx2000
2016-01-17 21:33 Alexx2000 Status new => resolved
2016-01-17 21:33 Alexx2000 Resolution open => fixed
2016-01-17 21:33 Alexx2000 Fixed in Version => 0.7.0
2016-01-17 21:33 Alexx2000 Target Version => 0.7.0
2020-06-19 21:52 Alexx2000 Status resolved => closed