Skip to content
Permalink
Browse files

Issue #140: Do not auto backup unsaved tab contents if it's larger th…

…an 10MB
  • Loading branch information...
ansgarbecker committed Apr 7, 2019
1 parent 3069456 commit 561a0edc7fe04f712fa421ae5a7346950a3239be
Showing with 7 additions and 3 deletions.
  1. +7 −3 source/main.pas
@@ -12883,9 +12883,13 @@ procedure TQueryTab.BackupUnsavedContent;
end;
end;
end else begin
MainForm.LogSQL('Saving backup file to "'+FMemoBackupFilename+'"...', lcDebug);
MainForm.ShowStatusMsg(_('Saving backup file...'));
SaveUnicodeFile(FMemoBackupFilename, Memo.Text);
if Memo.GetTextLen < SIZE_MB*10 then begin
MainForm.LogSQL('Saving backup file to "'+FMemoBackupFilename+'"...', lcDebug);
MainForm.ShowStatusMsg(_('Saving backup file...'));
SaveUnicodeFile(FMemoBackupFilename, Memo.Text);
end else begin
MainForm.LogSQL('Unsaved tab contents too large (> 10M) for creating a backup.', lcDebug);
end;
end;
MainForm.ShowStatusMsg('');
end;

0 comments on commit 561a0ed

Please sign in to comment.
You can’t perform that action at this time.