瀏覽代碼

* patch from Giulio for FindFirst return value with no files and SetFAttr with VolumeID - web bug #11247

git-svn-id: trunk@11231 -
Tomas Hajny 17 年之前
父節點
當前提交
68a4c0347a
共有 1 個文件被更改,包括 8 次插入0 次删除
  1. 8 0
      rtl/go32v2/dos.pp

+ 8 - 0
rtl/go32v2/dos.pp

@@ -489,6 +489,8 @@ begin
   dosregs.ax:=$714e;
   msdos(dosregs);
   LoadDosError;
+  if DosError=2 then
+    DosError:=18;
 {$ifdef DEBUG_LFN}
   if (DosError=0) and LogLFN then
     begin
@@ -811,6 +813,12 @@ end;
 
 procedure setfattr(var f;attr : word);
 begin
+  { Fail for setting VolumeId. }
+  if ((attr and VolumeID)<>0) then
+  begin
+    doserror:=5;
+    exit;
+  end;
   copytodos(filerec(f).name,strlen(filerec(f).name)+1);
   dosregs.edx:=tb_offset;
   dosregs.ds:=tb_segment;