mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-28 22:20:25 +02:00
LCL: CreateRelativePath not relative for complete paths
git-svn-id: trunk@16593 -
This commit is contained in:
parent
61d23c0541
commit
f74132f80f
@ -1266,7 +1266,7 @@ begin
|
||||
dec(BaseDirLen);
|
||||
if BaseDirLen=0 then exit;
|
||||
|
||||
// skip matching directories
|
||||
// count shared directories
|
||||
MinLen:=FileNameLength;
|
||||
if MinLen>BaseDirLen then MinLen:=BaseDirLen;
|
||||
p:=1;
|
||||
@ -1281,6 +1281,7 @@ begin
|
||||
and ((p>FileNameLength) or (CmpFilename[p]=PathDelim)) then
|
||||
inc(DirCount);
|
||||
if DirCount=0 then exit;
|
||||
if FilenameIsAbsolute(BaseDirectory) and (DirCount=1) then exit;
|
||||
|
||||
// calculate needed up directories
|
||||
BaseDirLen:=length(BaseDirectory);
|
||||
|
Loading…
Reference in New Issue
Block a user