소스 검색

AmiCommon: Missing UnLockDosList, DiskFree Bugfix

git-svn-id: trunk@29694 -
marcus 10 년 전
부모
커밋
141878978e
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;