瀏覽代碼

--- 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 年之前
父節點
當前提交
9c19728fc0
共有 2 個文件被更改,包括 4 次插入2 次删除
  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);
     end;
   until List = nil;
+  UnLockDosList(LDF_DEVICES or LDF_READ);
   RefreshDeviceList := NumDevices;
 end;
 
@@ -674,7 +675,7 @@ begin
   DiskFree := -1;
   if (Drive < 0) or (Drive >= NumDevices) then
     Exit;
-  DiskFree := DiskSize(DeviceList[Drive]);
+  DiskFree := DiskFree(DeviceList[Drive]);
 end;
 
 procedure FindFirst(const Path: PathStr; Attr: Word; Var f: SearchRec);

+ 2 - 1
rtl/amicommon/sysutils.pp

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