From e4412c9704fd7938739d5e6dc1c9daa8e8212b8f Mon Sep 17 00:00:00 2001 From: Graeme Geldenhuys Date: Mon, 18 Mar 2013 10:35:36 +0000 Subject: utils: Adds a new RTL wrapper to handle UTF-8 path names correctly. --- src/corelib/fpg_utils.pas | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/corelib') diff --git a/src/corelib/fpg_utils.pas b/src/corelib/fpg_utils.pas index dcc0cf71..9d0e907d 100644 --- a/src/corelib/fpg_utils.pas +++ b/src/corelib/fpg_utils.pas @@ -63,6 +63,7 @@ function fpgExtractFileDir(const FileName: TfpgString): TfpgString; function fpgExtractFilePath(const FileName: TfpgString): TfpgString; function fpgExtractFileName(const FileName: TfpgString): TfpgString; function fpgExtractFileExt(const FileName: TfpgString): TfpgString; +function fpgExtractRelativepath(const ABaseName, ADestName: TfpgString): TfpgString; function fpgForceDirectories(const ADirectory: TfpgString): Boolean; function fpgChangeFileExt(const FileName, Extension: TfpgString): TfpgString; function fpgGetAppConfigDir(const Global: Boolean): TfpgString; @@ -164,6 +165,11 @@ begin Result := ExtractFileExt(fpgToOSEncoding(Filename)); end; +function fpgExtractRelativepath(const ABaseName, ADestName: TfpgString): TfpgString; +begin + Result := ExtractRelativepath(fpgToOSEncoding(ABaseName), fpgToOSEncoding(ADestName)); +end; + function fpgForceDirectories(const ADirectory: TfpgString): Boolean; begin Result := ForceDirectories(fpgToOSEncoding(ADirectory)); -- cgit v1.2.3-70-g09d2