mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-11 04:52:21 +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 _;
|
WaitEvent mProcessingEvent ~ delete _;
|
||||||
String mWorkspaceDir = new String() ~ delete _;
|
String mWorkspaceDir = new String() ~ delete _;
|
||||||
bool mWantWorkspaceCleanup;
|
bool mWantWorkspaceCleanup;
|
||||||
|
public bool mDisabled;
|
||||||
|
|
||||||
public ~this()
|
public ~this()
|
||||||
{
|
{
|
||||||
|
@ -177,7 +178,7 @@ namespace IDE
|
||||||
|
|
||||||
public void CheckWorkspace()
|
public void CheckWorkspace()
|
||||||
{
|
{
|
||||||
if (gApp.mSettings.mEditorSettings.mEnableFileRecovery != .Yes)
|
if ((gApp.mSettings.mEditorSettings.mEnableFileRecovery != .Yes) && (!mDisabled))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
mWantWorkspaceCleanup = true;
|
mWantWorkspaceCleanup = true;
|
||||||
|
|
|
@ -7192,6 +7192,10 @@ namespace IDE
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
fallthrough;
|
fallthrough;
|
||||||
|
#if !CLI
|
||||||
|
case "-noRecover":
|
||||||
|
mFileRecovery?.mDisabled = true;
|
||||||
|
#endif
|
||||||
case "-forceSafe":
|
case "-forceSafe":
|
||||||
mSafeMode = true;
|
mSafeMode = true;
|
||||||
mNoResolve = true;
|
mNoResolve = true;
|
||||||
|
|
|
@ -890,7 +890,11 @@ namespace IDE.ui
|
||||||
public void CheckSavedContents()
|
public void CheckSavedContents()
|
||||||
{
|
{
|
||||||
if (((mEditData != null)) && (mEditData.mLastFileTextVersion == mEditWidget.Content.mData.mCurTextVersionId) && (mEditData.mRecoveryHash.IsZero) &&
|
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 .();
|
String text = scope .();
|
||||||
mEditWidget.GetText(text);
|
mEditWidget.GetText(text);
|
||||||
|
@ -5939,7 +5943,7 @@ namespace IDE.ui
|
||||||
{
|
{
|
||||||
#if !CLI
|
#if !CLI
|
||||||
DeleteAndNullify!(mFileRecoveryEntry);
|
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 .();
|
String contents = scope .();
|
||||||
mEditWidget.GetText(contents);
|
mEditWidget.GetText(contents);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue