mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-05-10 17:22:42 +02:00
IDE: UpdateLRSFromLFM: auto create directory
git-svn-id: trunk@22363 -
This commit is contained in:
parent
e81f70915d
commit
e976d4b51b
@ -1058,9 +1058,11 @@ function TBuildManager.UpdateLRSFromLFM(AnUnitInfo: TUnitInfo;
|
|||||||
var
|
var
|
||||||
LFMFilename: String;
|
LFMFilename: String;
|
||||||
LRSFilename: String;
|
LRSFilename: String;
|
||||||
|
Dir: String;
|
||||||
begin
|
begin
|
||||||
Result:=mrOk;
|
Result:=mrOk;
|
||||||
// check if there is a .lfm file
|
// check if there is a .lfm file
|
||||||
|
if AnUnitInfo.IsVirtual then exit;
|
||||||
LFMFilename:=ChangeFileExt(AnUnitInfo.Filename,'.lfm');
|
LFMFilename:=ChangeFileExt(AnUnitInfo.Filename,'.lfm');
|
||||||
if not FileExistsCached(LFMFilename) then exit(mrOk);
|
if not FileExistsCached(LFMFilename) then exit(mrOk);
|
||||||
// check if there is a .lrs file
|
// check if there is a .lrs file
|
||||||
@ -1073,6 +1075,9 @@ begin
|
|||||||
debugln('TBuildManager.UpdateLRSFromLFM ',LRSFilename,' LFMAge=',dbgs(FileAgeUTF8(LFMFilename)),' LRSAge=',dbgs(FileAgeUTF8(LRSFilename)));
|
debugln('TBuildManager.UpdateLRSFromLFM ',LRSFilename,' LFMAge=',dbgs(FileAgeUTF8(LFMFilename)),' LRSAge=',dbgs(FileAgeUTF8(LRSFilename)));
|
||||||
// the .lrs file does not exist, or is older than the .lfm file
|
// the .lrs file does not exist, or is older than the .lfm file
|
||||||
// -> update .lrs file
|
// -> update .lrs file
|
||||||
|
Dir:=ExtractFilePath(LRSFilename);
|
||||||
|
Result:=ForceDirectoryInteractive(Dir,[mbRetry]);
|
||||||
|
if Result<>mrOk then exit;
|
||||||
Result:=ConvertLFMToLRSFileInteractive(LFMFilename,LRSFilename,ShowAbort);
|
Result:=ConvertLFMToLRSFileInteractive(LFMFilename,LRSFilename,ShowAbort);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user