mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-30 15:10:16 +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);
|
dec(BaseDirLen);
|
||||||
if BaseDirLen=0 then exit;
|
if BaseDirLen=0 then exit;
|
||||||
|
|
||||||
// skip matching directories
|
// count shared directories
|
||||||
MinLen:=FileNameLength;
|
MinLen:=FileNameLength;
|
||||||
if MinLen>BaseDirLen then MinLen:=BaseDirLen;
|
if MinLen>BaseDirLen then MinLen:=BaseDirLen;
|
||||||
p:=1;
|
p:=1;
|
||||||
@ -1281,6 +1281,7 @@ begin
|
|||||||
and ((p>FileNameLength) or (CmpFilename[p]=PathDelim)) then
|
and ((p>FileNameLength) or (CmpFilename[p]=PathDelim)) then
|
||||||
inc(DirCount);
|
inc(DirCount);
|
||||||
if DirCount=0 then exit;
|
if DirCount=0 then exit;
|
||||||
|
if FilenameIsAbsolute(BaseDirectory) and (DirCount=1) then exit;
|
||||||
|
|
||||||
// calculate needed up directories
|
// calculate needed up directories
|
||||||
BaseDirLen:=length(BaseDirectory);
|
BaseDirLen:=length(BaseDirectory);
|
||||||
|
Loading…
Reference in New Issue
Block a user