LCL: fixed CreateRelativePath e.g. ideintf/some.pas to ide

git-svn-id: trunk@23760 -
This commit is contained in:
mattias 2010-02-22 21:49:06 +00:00
parent 03419d8ebb
commit e6d6601c17

View File

@ -1325,19 +1325,18 @@ begin
inc(BaseDirPos);
end;
end;
UpDirCount:=0;
if ((BaseDirPos>BaseDirLen) or (CmpBaseDirectory[BaseDirPos]=PathDelim))
and ((p>FileNameLength) or (CmpFilename[p]=PathDelim)) then
begin
inc(DirCount);
inc(BaseDirPos);
end;
end else
inc(UpDirCount);
if DirCount=0 then exit;
if FilenameIsAbsolute(BaseDirectory) and (DirCount=1) then exit;
// calculate needed up directories
UpDirCount:=0;
if (BaseDirPos<=BaseDirLen) and (CmpBaseDirectory[BaseDirPos]<>PathDelim) then
inc(UpDirCount);
while (BaseDirPos<=BaseDirLen) do begin
if (CmpBaseDirectory[BaseDirPos]=PathDelim) then
begin