From f9f7a2de6fa0313d84c07d5008c3fc91cb4e8c38 Mon Sep 17 00:00:00 2001 From: DavidXanatos <3890945+DavidXanatos@users.noreply.github.com> Date: Sun, 7 Jan 2024 17:53:43 +0100 Subject: [PATCH] #3504 --- CHANGELOG.md | 1 + Sandboxie/core/svc/MountManager.cpp | 6 ++++++ SandboxiePlus/SandMan/SbiePlusAPI.h | 1 + SandboxiePlus/SandMan/Wizards/NewBoxWizard.cpp | 4 +++- 4 files changed, 11 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8bb826ec..7c07da17 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,7 @@ This project adheres to [Semantic Versioning](http://semver.org/). - Note: when the volume later gets a drive letter the data under \drive\{guid} will be ignored! - fixed right click a sandbox shortcut - click run unsandboxed in order to open the file without sandbox [#3528](https://github.com/sandboxie-plus/Sandboxie/issues/3528) - Note: for the fix to take full effect the shell integration need to be re applied + - fixed Error Status: 0x0000065b (Function Failed During Execution) [#3504](https://github.com/sandboxie-plus/Sandboxie/issues/3504) diff --git a/Sandboxie/core/svc/MountManager.cpp b/Sandboxie/core/svc/MountManager.cpp index 7c5c8eaf..8830bc6d 100644 --- a/Sandboxie/core/svc/MountManager.cpp +++ b/Sandboxie/core/svc/MountManager.cpp @@ -225,6 +225,12 @@ MSG_HEADER *MountManager::CreateHandler(MSG_HEADER *msg) std::wstring ImageFile = GetImageFileName(req->file_root); + std::wstring RootPath(req->file_root, wcsrchr(req->file_root, L'\\')); + HANDLE handle = OpenOrCreateNtFolder(RootPath.c_str()); + if (!handle) + return SHORT_REPLY(ERROR_PATH_NOT_FOUND); + CloseHandle(handle); + std::shared_ptr pMount = MountImDisk(ImageFile, req->password, req->image_size, session_id); if(!pMount) return SHORT_REPLY(ERROR_FUNCTION_FAILED); diff --git a/SandboxiePlus/SandMan/SbiePlusAPI.h b/SandboxiePlus/SandMan/SbiePlusAPI.h index 46e6ed4e..87c9404b 100644 --- a/SandboxiePlus/SandMan/SbiePlusAPI.h +++ b/SandboxiePlus/SandMan/SbiePlusAPI.h @@ -44,6 +44,7 @@ signals: protected: friend class CSandBoxPlus; + friend class CNewBoxWizard; virtual CSandBox* NewSandBox(const QString& BoxName, class CSbieAPI* pAPI); virtual CBoxedProcess* NewBoxedProcess(quint32 ProcessId, class CSandBox* pBox); diff --git a/SandboxiePlus/SandMan/Wizards/NewBoxWizard.cpp b/SandboxiePlus/SandMan/Wizards/NewBoxWizard.cpp index a81f5824..ce2498ab 100644 --- a/SandboxiePlus/SandMan/Wizards/NewBoxWizard.cpp +++ b/SandboxiePlus/SandMan/Wizards/NewBoxWizard.cpp @@ -128,8 +128,10 @@ SB_STATUS CNewBoxWizard::TryToCreateBox() QString Location = field("boxLocation").toString(); - if (!Location.isEmpty()) + if (!Location.isEmpty()) { pBox->SetText("FileRootPath", Location); + theAPI->UpdateBoxPaths(pBox.data()); + } if (field("boxVersion").toInt() == 1) { pBox->SetBool("UseFileDeleteV2", true);