mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-10 04:22:20 +02:00
Cmd line option to disable file recovery
This commit is contained in:
parent
63792924e0
commit
b49cd5d12a
3 changed files with 12 additions and 3 deletions
|
@ -56,6 +56,7 @@ namespace IDE
|
|||
WaitEvent mProcessingEvent ~ delete _;
|
||||
String mWorkspaceDir = new String() ~ delete _;
|
||||
bool mWantWorkspaceCleanup;
|
||||
public bool mDisabled;
|
||||
|
||||
public ~this()
|
||||
{
|
||||
|
@ -177,7 +178,7 @@ namespace IDE
|
|||
|
||||
public void CheckWorkspace()
|
||||
{
|
||||
if (gApp.mSettings.mEditorSettings.mEnableFileRecovery != .Yes)
|
||||
if ((gApp.mSettings.mEditorSettings.mEnableFileRecovery != .Yes) && (!mDisabled))
|
||||
return;
|
||||
|
||||
mWantWorkspaceCleanup = true;
|
||||
|
|
|
@ -7192,6 +7192,10 @@ namespace IDE
|
|||
}
|
||||
#endif
|
||||
fallthrough;
|
||||
#if !CLI
|
||||
case "-noRecover":
|
||||
mFileRecovery?.mDisabled = true;
|
||||
#endif
|
||||
case "-forceSafe":
|
||||
mSafeMode = true;
|
||||
mNoResolve = true;
|
||||
|
|
|
@ -890,7 +890,11 @@ namespace IDE.ui
|
|||
public void CheckSavedContents()
|
||||
{
|
||||
if (((mEditData != null)) && (mEditData.mLastFileTextVersion == mEditWidget.Content.mData.mCurTextVersionId) && (mEditData.mRecoveryHash.IsZero) &&
|
||||
(gApp.mSettings.mEditorSettings.mEnableFileRecovery != .No))
|
||||
(gApp.mSettings.mEditorSettings.mEnableFileRecovery != .No)
|
||||
#if !CLI
|
||||
&& (!gApp.mFileRecovery.mDisabled)
|
||||
#endif
|
||||
)
|
||||
{
|
||||
String text = scope .();
|
||||
mEditWidget.GetText(text);
|
||||
|
@ -5939,7 +5943,7 @@ namespace IDE.ui
|
|||
{
|
||||
#if !CLI
|
||||
DeleteAndNullify!(mFileRecoveryEntry);
|
||||
if ((mFilePath != null) && (mEditData != null) && (!mEditData.mRecoveryHash.IsZero) && (gApp.mSettings.mEditorSettings.mEnableFileRecovery != .No))
|
||||
if ((mFilePath != null) && (mEditData != null) && (!mEditData.mRecoveryHash.IsZero) && (gApp.mSettings.mEditorSettings.mEnableFileRecovery != .No) && (!gApp.mFileRecovery.mDisabled))
|
||||
{
|
||||
String contents = scope .();
|
||||
mEditWidget.GetText(contents);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue