Explorar o código

* fixed setfattr with volumeid

peter %!s(int64=22) %!d(string=hai) anos
pai
achega
52683bba4b
Modificáronse 1 ficheiros con 11 adicións e 3 borrados
  1. 11 3
      rtl/win32/dos.pp

+ 11 - 3
rtl/win32/dos.pp

@@ -896,8 +896,13 @@ end;
 
 
 procedure setfattr(var f;attr : word);
 procedure setfattr(var f;attr : word);
 begin
 begin
-  doserror:=0;
-  if not(SetFileAttributes(filerec(f).name,attr)) then
+  { Fail for setting VolumeId }
+  if (attr and VolumeID)<>0 then
+    doserror:=5
+  else
+   if SetFileAttributes(filerec(f).name,attr) then
+    doserror:=0
+  else 
     doserror:=getlasterror;
     doserror:=getlasterror;
 end;
 end;
 
 
@@ -1085,7 +1090,10 @@ begin
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.20  2003-09-17 15:06:36  peter
+  Revision 1.21  2003-10-27 15:27:47  peter
+    * fixed setfattr with volumeid
+
+  Revision 1.20  2003/09/17 15:06:36  peter
     * stdcall patch
     * stdcall patch
 
 
   Revision 1.19  2003/06/10 11:16:15  jonas
   Revision 1.19  2003/06/10 11:16:15  jonas