[SOLVED] Simplified ExcludeLeadingPathDelimiter lazarus / 64-FPC development ---------------------------------------------------------------------- lagprogramming · 2023-08-29 08:43 rtl/objpas/sysutils/fina.inc has Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i function ExcludeLeadingPathDelimiter(Const Path: PathStr): PathStr; Var  L : Integer; begin  Result:=Path;  L:=Length(Result);  If (L>0) and CharInSet(Result[1],AllowDirectorySeparators) then    Delete(Result,1,1);end;After replacing "If (L>0)" with "If (Result<>'')" and removing the variable "L", the function becomes: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i function ExcludeLeadingPathDelimiter(Const Path: PathStr): PathStr;begin  Result:=Path;  If (Result<>'') and CharInSet(Result[1],AllowDirectorySeparators) then    Delete(Result,1,1);end; A patch is attached. ---------------------------------------------------------------------- Fibonacci · 2023-08-29 08:46 Why don't you submit these patches on gitlab? ---------------------------------------------------------------------- AlexTP · 2023-08-29 09:01 Postted to https://gitlab.com/freepascal.org/fpc/source/-/issues/40415 ---------------------------------------------------------------------- AlexTP · 2023-08-29 09:07 Sorry for the last comment-- I misread the code and 'found' for-loop. ---------------------------------------------------------------------- Fibonacci · 2023-08-29 09:09 Yeah I was wondering where is that loop