runnable module, always abort any previous runnable process

This commit is contained in:
Basile Burg 2015-05-11 02:46:16 +02:00
parent 917ea7a23c
commit 35c7d0a2ed
1 changed files with 4 additions and 3 deletions

View File

@ -769,8 +769,9 @@ begin
exit; exit;
// //
fname := fRunProc.Executable; fname := fRunProc.Executable;
if ExtractFileDir(fname) <> GetTempDir(false) then if getprocInputHandler.process = fRunProc then
exit; getMessageDisplay.message('the execution of a runnable module ' +
'has been implicitly aborted', fDoc, amcEdit, amkWarn);
killProcess(fRunProc); killProcess(fRunProc);
if fileExists(fname) then if fileExists(fname) then
sysutils.DeleteFile(fname); sysutils.DeleteFile(fname);
@ -1359,6 +1360,7 @@ var
fname: string; fname: string;
begin begin
fMsgs.clearByData(fDoc);
FreeRunnableProc; FreeRunnableProc;
if fDoc = nil then exit; if fDoc = nil then exit;
@ -1379,7 +1381,6 @@ begin
dmdproc := TProcess.Create(nil); dmdproc := TProcess.Create(nil);
try try
fMsgs.clearByData(fDoc);
fMsgs.message('compiling ' + shortenPath(fDoc.fileName, 25), fDoc, amcEdit, amkInf); fMsgs.message('compiling ' + shortenPath(fDoc.fileName, 25), fDoc, amcEdit, amkInf);
if fileExists(fDoc.fileName) then fDoc.save if fileExists(fDoc.fileName) then fDoc.save