diff --git a/CHANGELOG.md b/CHANGELOG.md index 15f73ecb..3527e9c0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -26,6 +26,7 @@ This project adheres to [Semantic Versioning](http://semver.org/). - fixed existing BoxNameTitle=process.exe,- removed when toggling other options [#3106](https://github.com/sandboxie-plus/Sandboxie/issues/3106) - fixed asynchroniusly assigned PCA job not being properly detected [#1919](https://github.com/sandboxie-plus/Sandboxie/issues/1919) - fixed incompatybility with first windows 10 release [#3117](https://github.com/sandboxie-plus/Sandboxie/issues/3117) +- fixed Remove Sandbox only deletes the contents of the sandbox when an application is running in the sandbox [#3118](https://github.com/sandboxie-plus/Sandboxie/issues/3118) diff --git a/SandboxiePlus/SandMan/SandMan.cpp b/SandboxiePlus/SandMan/SandMan.cpp index d2213504..f558dcb3 100644 --- a/SandboxiePlus/SandMan/SandMan.cpp +++ b/SandboxiePlus/SandMan/SandMan.cpp @@ -1797,6 +1797,7 @@ SB_STATUS CSandMan::DeleteBoxContent(const CSandBoxPtr& pBox, EDelMode Mode, boo Ret = pBox->TerminateAll(); if (Ret.IsError()) return Ret; + UpdateProcesses(); } auto pBoxEx = pBox.objectCast(); diff --git a/SandboxiePlus/SandMan/Views/SbieView.cpp b/SandboxiePlus/SandMan/Views/SbieView.cpp index 1ae3b06d..83fec5c6 100644 --- a/SandboxiePlus/SandMan/Views/SbieView.cpp +++ b/SandboxiePlus/SandMan/Views/SbieView.cpp @@ -1357,13 +1357,14 @@ void CSbieView::OnSandBoxAction(QAction* Action, const QList& SandB SB_STATUS Status = SB_OK; if (!pBox->GetBool("IsShadow")) { - Status = theGUI->DeleteBoxContent(pBox, CSandMan::eForDelete); - if (Status.GetMsgCode() == SB_Canceled) - break; + if (pBox->GetBool("NeverRemove", false)) + Status = SB_ERR(SB_DeleteProtect); + else { + Status = theGUI->DeleteBoxContent(pBox, CSandMan::eForDelete); + if (Status.GetMsgCode() == SB_Canceled) + break; + } } - - if (pBox->GetBool("NeverRemove", false)) - Status = SB_ERR(SB_DeleteProtect); QString Name = pBox->GetName(); if (!Status.IsError())