close #145 - External modification tracking, also warns about deleted files

This commit is contained in:
Basile Burg 2017-06-01 12:18:36 +02:00
parent 1ef89121e7
commit 220a68a59c
No known key found for this signature in database
GPG Key ID: 1868039F415CB8CF
1 changed files with 10 additions and 2 deletions

View File

@ -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 <> '<new document>') 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;