From cf4e7671069e9d5fcd1e0c450236f0dda99564d6 Mon Sep 17 00:00:00 2001 From: mattias Date: Tue, 26 Oct 2010 15:15:57 +0000 Subject: [PATCH] IDE: do not save project.compiled file for virtual projects, bug #17705 git-svn-id: trunk@27886 - --- ide/project.pp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/ide/project.pp b/ide/project.pp index eb85ff3ac5..d3544731d4 100644 --- a/ide/project.pp +++ b/ide/project.pp @@ -4879,8 +4879,10 @@ end; function TProject.GetStateFilename: string; begin - Result:=GetOutputDirectory - +ChangeFileExt(GetCompileSourceFilename,'.compiled'); + Result:=GetOutputDirectory; + if (not FilenameIsAbsolute(Result)) and (not IsVirtual) then + Result:=ProjectDirectory; + Result:=AppendPathDelim(Result)+ChangeFileExt(GetCompileSourceFilename,'.compiled'); end; function TProject.GetTestDirectory: string; @@ -4919,7 +4921,8 @@ var CurStateFileAge: Integer; begin StateFile:=GetStateFilename; - if not FileExistsUTF8(StateFile) then begin + if (not FilenameIsAbsolute(StateFile)) or (not FileExistsUTF8(StateFile)) then + begin DebugLn('TProject.DoLoadStateFile Statefile not found: ',StateFile); StateFlags:=StateFlags-[lpsfStateFileLoaded]; Result:=mrOk; @@ -4969,6 +4972,7 @@ var CompilerFileDate: Integer; begin StateFile:=GetStateFilename; + if not FilenameIsAbsolute(StateFile) then exit(mrOk); try CompilerFileDate:=FileAgeCached(CompilerFilename); XMLConfig:=TCodeBufXMLConfig.CreateWithCache(StateFile,false);