Browse Source

* Made file open read-only

git-svn-id: trunk@4417 -
michael 19 years ago
parent
commit
ad11bfe96d
1 changed files with 5 additions and 1 deletions
  1. 5 1
      packages/base/hash/md5.pp

+ 5 - 1
packages/base/hash/md5.pp

@@ -336,11 +336,14 @@ var
   Buf : Pchar;
   Context: TMD5Context;
   Count : Longint;
-
+  ofm : Longint;
+  
 begin
   MD5Init(Context);
   Assign(F,N);
   {$i-}
+  ofm:=FileMode;
+  FileMode:=0;
   Reset(F,1);
   {$i+}
   if (IOResult=0) then
@@ -355,6 +358,7 @@ begin
     Close(F);
     end;
   MD5Final(Context, Result);
+  FileMode:=ofm;
 end;