diff options
author | Graeme Geldenhuys <graeme@mastermaths.co.za> | 2010-10-01 16:39:05 +0200 |
---|---|---|
committer | Graeme Geldenhuys <graeme@mastermaths.co.za> | 2010-10-01 16:39:05 +0200 |
commit | d9016ba784d73d9835fac6c135001f9f2aae9a9a (patch) | |
tree | 972a07353ab0a5d8c16a33a2c9492a53fc46c301 | |
parent | 70bd8e2d539c594b44d26bcf151af0b00b663854 (diff) | |
download | fpGUI-d9016ba784d73d9835fac6c135001f9f2aae9a9a.tar.xz |
Fix compilation under Windows. Force DeleteFile() from Sysutils, not Windows API.
-rw-r--r-- | src/corelib/fpg_utils.pas | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/corelib/fpg_utils.pas b/src/corelib/fpg_utils.pas index 3300a07f..822051a5 100644 --- a/src/corelib/fpg_utils.pas +++ b/src/corelib/fpg_utils.pas @@ -132,7 +132,9 @@ end; function fpgDeleteFile(const FileName: TfpgString): Boolean; begin - Result := DeleteFile(fpgToOSEncoding(FileName)); + { Don't remove 'SysUtils.' prefix, it is required under Windows, other + FPC tries to use Windows.DeleteFile API - which is wrong } + Result := SysUtils.DeleteFile(fpgToOSEncoding(FileName)); end; function fpgDirectoryExists(const ADirectory: TfpgString): Boolean; |