diff options
author | Graeme Geldenhuys <graemeg@gmail.com> | 2009-10-12 00:41:51 +0200 |
---|---|---|
committer | Graeme Geldenhuys <graemeg@gmail.com> | 2009-10-12 00:41:51 +0200 |
commit | 912c004ba565e33c49a6eb8fda679a6a5facd30e (patch) | |
tree | 2be093bad44e9abce913013a56f59646ff6a4000 | |
parent | 0bbdaf1dc42ad272a646bf9e880c10c1d8e071c0 (diff) | |
download | fpGUI-912c004ba565e33c49a6eb8fda679a6a5facd30e.tar.xz |
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 <graemeg@gmail.com>
-rw-r--r-- | src/nvUtilities.pas | 9 |
1 files 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); |