mirror of https://gitlab.com/basile.b/dexed.git
fix editor temp filename was considered as a valid filename
This commit is contained in:
parent
094a7d7ece
commit
da52e21153
|
@ -1045,12 +1045,15 @@ end;
|
||||||
procedure TCEMainForm.actFileSaveExecute(Sender: TObject);
|
procedure TCEMainForm.actFileSaveExecute(Sender: TObject);
|
||||||
var
|
var
|
||||||
str: string;
|
str: string;
|
||||||
|
ed: TCESynMemo;
|
||||||
begin
|
begin
|
||||||
if fEditWidg = nil then exit;
|
if fEditWidg = nil then exit;
|
||||||
if fEditWidg.editorIndex < 0 then exit;
|
ed := fEditWidg.currentEditor;
|
||||||
|
if ed = nil then exit;
|
||||||
//
|
//
|
||||||
str := fEditWidg.editor[fEditWidg.editorIndex].fileName;
|
str := ed.fileName;
|
||||||
if fileExists(str) then saveFile(fEditWidg.editorIndex)
|
if (str <> ed.tempFilename) and (fileExists(str)) then
|
||||||
|
saveFile(fEditWidg.editorIndex)
|
||||||
else actFileSaveAs.Execute;
|
else actFileSaveAs.Execute;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue