Browse Source

* Fixed ExcludeLeadingPathDelimiter

git-svn-id: trunk@19316 -
michael 14 years ago
parent
commit
908f9865d4
1 changed files with 4 additions and 4 deletions
  1. 4 4
      rtl/objpas/sysutils/fina.inc

+ 4 - 4
rtl/objpas/sysutils/fina.inc

@@ -292,10 +292,10 @@ Var
   L : Integer;
   L : Integer;
 
 
 begin
 begin
-  L:=Length(Path);
-  If (L>0) and (Path[1] in AllowDirectorySeparators) then
-    Dec(L);
-  Result:=Copy(Path,2,L);
+  Result:=Path;
+  L:=Length(Result);
+  If (L>0) and (Result[1] in AllowDirectorySeparators) then
+    Delete(Result,1,1);
 end;
 end;
 
 
 function IsPathDelimiter(Const Path: string; Index: Integer): Boolean;
 function IsPathDelimiter(Const Path: string; Index: Integer): Boolean;