Browse Source

--- Merging r29694 into '.':
U rtl/amicommon/dos.pp
U rtl/amicommon/sysutils.pp

# revisions: 29694

git-svn-id: branches/fixes_3_0@29718 -

marco 10 years ago
parent
commit
9c19728fc0
2 changed files with 4 additions and 2 deletions
  1. 2 1
      rtl/amicommon/dos.pp
  2. 2 1
      rtl/amicommon/sysutils.pp

+ 2 - 1
rtl/amicommon/dos.pp

@@ -606,6 +606,7 @@ begin
         AddDisk(Str);
         AddDisk(Str);
     end;
     end;
   until List = nil;
   until List = nil;
+  UnLockDosList(LDF_DEVICES or LDF_READ);
   RefreshDeviceList := NumDevices;
   RefreshDeviceList := NumDevices;
 end;
 end;
 
 
@@ -674,7 +675,7 @@ begin
   DiskFree := -1;
   DiskFree := -1;
   if (Drive < 0) or (Drive >= NumDevices) then
   if (Drive < 0) or (Drive >= NumDevices) then
     Exit;
     Exit;
-  DiskFree := DiskSize(DeviceList[Drive]);
+  DiskFree := DiskFree(DeviceList[Drive]);
 end;
 end;
 
 
 procedure FindFirst(const Path: PathStr; Attr: Word; Var f: SearchRec);
 procedure FindFirst(const Path: PathStr; Attr: Word; Var f: SearchRec);

+ 2 - 1
rtl/amicommon/sysutils.pp

@@ -615,6 +615,7 @@ begin
         AddDisk(Str);
         AddDisk(Str);
     end;
     end;
   until List = nil;
   until List = nil;
+  UnLockDosList(LDF_DEVICES or LDF_READ);
   RefreshDeviceList := NumDevices;
   RefreshDeviceList := NumDevices;
 end;
 end;
 
 
@@ -683,7 +684,7 @@ begin
   DiskFree := -1;
   DiskFree := -1;
   if (Drive < 0) or (Drive >= NumDevices) then
   if (Drive < 0) or (Drive >= NumDevices) then
     Exit;
     Exit;
-  DiskFree := DiskSize(DeviceList[Drive]);
+  DiskFree := DiskFree(DeviceList[Drive]);
 end;
 end;
 
 
 function DirectoryExists(const Directory: RawByteString): Boolean;
 function DirectoryExists(const Directory: RawByteString): Boolean;