diff --git a/components/codetools/fileprocs.pas b/components/codetools/fileprocs.pas index 8a3e7f04f6..25f129db73 100644 --- a/components/codetools/fileprocs.pas +++ b/components/codetools/fileprocs.pas @@ -1816,6 +1816,8 @@ begin CurDir:=copy(Result,StartPos,EndPos-StartPos); if FilenameIsAbsolute(CurDir) then begin NewCurDir:=CreateRelativePath(CurDir,BaseDirectory); + if (NewCurDir<>CurDir) and (NewCurDir='') then + NewCurDir:='.'; if NewCurDir<>CurDir then begin DiffLen:=length(NewCurDir)-length(CurDir); Result:=copy(Result,1,StartPos-1)+NewCurDir