From: <tw...@us...> - 2024-09-16 12:00:36
|
Revision: 4320 http://sourceforge.net/p/gexperts/code/4320 Author: twm Date: 2024-09-16 12:00:33 +0000 (Mon, 16 Sep 2024) Log Message: ----------- * string -> TGXUnicodeString * fixed compile errors in Delphi 6/7 and 2007 Modified Paths: -------------- trunk/Source/CodeLibrarian/GX_CodeLibFile.pas Modified: trunk/Source/CodeLibrarian/GX_CodeLibFile.pas =================================================================== --- trunk/Source/CodeLibrarian/GX_CodeLibFile.pas 2024-09-16 11:44:13 UTC (rev 4319) +++ trunk/Source/CodeLibrarian/GX_CodeLibFile.pas 2024-09-16 12:00:33 UTC (rev 4320) @@ -61,19 +61,22 @@ implementation +uses + u_dzStringUtils; + { TGXStorageFile } function TGXStorageFile.AddSlash(const FolderName: TGXUnicodeString): TGXUnicodeString; - function IsPathSep(const s: string; Index: Integer): Boolean; + function IsPathSep(const s: TGXUnicodeString; Index: Integer): Boolean; begin - Result := (Index >= Low(string)) and (Index <= High(s)) and (s[Index] = CodeLibPathSep) + Result := (Index > 0) and (Index <= Length(s)) and (s[Index] = CodeLibPathSep) and (ByteType(s, Index) = mbSingleByte); end; begin Result := FolderName; - if not IsPathSep(Result, High(Result)) then + if not IsPathSep(Result, Length(Result)) then Result := Result + CodeLibPathSep; end; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |