Browse Source

--- Merging r19316 into '.':
U rtl/objpas/sysutils/fina.inc

# revisions: 19316
------------------------------------------------------------------------
r19316 | michael | 2011-10-01 23:47:58 +0200 (Sat, 01 Oct 2011) | 1 line
Changed paths:
M /trunk/rtl/objpas/sysutils/fina.inc

* Fixed ExcludeLeadingPathDelimiter
------------------------------------------------------------------------

git-svn-id: branches/fixes_2_6@19317 -

marco 14 years ago
parent
commit
2bfd868dfb
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;
 
 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;
 
 function IsPathDelimiter(Const Path: string; Index: Integer): Boolean;