From 912c004ba565e33c49a6eb8fda679a6a5facd30e Mon Sep 17 00:00:00 2001 From: Graeme Geldenhuys Date: Mon, 12 Oct 2009 00:41:51 +0200 Subject: Fixed permission denied error when opening help files. Based on certain permission settings, it was sometimes not possible to open the INF help files. I have now explicity told the Assign() method that I am only intereset in read-only access. Signed-off-by: Graeme Geldenhuys --- src/nvUtilities.pas | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/nvUtilities.pas b/src/nvUtilities.pas index 87cd83a3..7b57cfa3 100644 --- a/src/nvUtilities.pas +++ b/src/nvUtilities.pas @@ -3,7 +3,7 @@ unit nvUtilities; {$mode objfpc}{$H+} // disable to remove debugging output -{$Define DEBUG} +{.$Define DEBUG} interface @@ -45,7 +45,9 @@ Operator = (ARect: TRect; BRect: TRect): boolean; implementation -//uses +uses + fpg_utils + ; // character // from utf8tools package (pulls in LCL requirement which we MUST change) // ; @@ -101,8 +103,9 @@ var f: File; begin Result := 0; - Assign(f, AFileName); {$i-} + FileMode := 0; // read-only + Assign(f, fpgToOSEncoding(AFileName)); Reset(f); {$i+} Result := FileSize(f); -- cgit v1.2.3-70-g09d2