From 220a68a59c8ac5cc5219f62993678391f96c04fc Mon Sep 17 00:00:00 2001 From: Basile Burg Date: Thu, 1 Jun 2017 12:18:36 +0200 Subject: [PATCH] close #145 - External modification tracking, also warns about deleted files --- src/ce_synmemo.pas | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/ce_synmemo.pas b/src/ce_synmemo.pas index 06e12a17..e8a97f83 100644 --- a/src/ce_synmemo.pas +++ b/src/ce_synmemo.pas @@ -2489,9 +2489,17 @@ var str: TStringList; txt: string; begin - if (fFilename = fTempFileName) or fDisableFileDateCheck - or not FileAge(fFilename, newDate) or (fFileDate = newDate) then + if fDisableFileDateCheck then exit; + if fFilename.isNotEmpty and not fFilename.fileExists and + (fFilename <> '') then + begin + // cant use a dialog: dialog closed -> doc focused -> warn again, etc + getMessageDisplay.message(fFilename + ' does not exist anymore', self, amcEdit, amkWarn); + end; + if (fFilename = fTempFileName) or fDisableFileDateCheck + or not FileAge(fFilename, newDate) or (fFileDate = newDate) then + exit; if (fFileDate <> 0.0) then begin str := TStringList.Create;