Skip to content

Commit

Permalink
1.11.0a
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidXanatos committed Aug 26, 2023
1 parent c5304c5 commit 2542351
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 10 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Expand Up @@ -9,6 +9,9 @@ This project adheres to [Semantic Versioning](http://semver.org/).
### Changed
- changed the new optin layout to now be the default for non vintage views (can be changed back in the settings)

### Fixed
- fixed issue when re creating rambox junction



## [1.11.0 / 5.66.0] - 2023-08-25
Expand Down
20 changes: 10 additions & 10 deletions Sandboxie/core/svc/MountManager.cpp
Expand Up @@ -966,7 +966,7 @@ bool MountManager::AcquireBoxRoot(const WCHAR* boxname, const WCHAR* reg_root, c

if (!pRoot->InUse) {
std::shared_ptr<BOX_MOUNT>& pMount = UseRamDisk ? m_RamDisk : pRoot->Mount;
if (pMount && pRoot->Mount && !pRoot->Mount->NtPath.empty()) {
if (pMount && !pMount->NtPath.empty()) {
std::wstring proxy = ImDiskQueryDeviceProxy(pMount->NtPath);
if (_wcsnicmp(proxy.c_str(), L"\\BaseNamedObjects\\Global\\" IMBOX_PROXY, 25 + 11) != 0)
pMount->NtPath.clear();
Expand Down Expand Up @@ -1019,23 +1019,23 @@ bool MountManager::AcquireBoxRoot(const WCHAR* boxname, const WCHAR* reg_root, c

if (!pRoot->Mount || pRoot->Mount->NtPath.empty())
errlvl = 0x11;
else {
TargetNtPath = pRoot->Mount->NtPath + L"\\";
if (UseRamDisk) // ram disk is shared so individualize the folder names
TargetNtPath += boxname;
else
TargetNtPath += SBIEDISK_LABEL;
else
pRoot->Path = file_root;
}
// pRoot->Mount->RefCount++;
}

if (!TargetNtPath.empty()) {
if (errlvl == 0 && !pRoot->InUse) {

//
// Append box name and try to create
//

TargetNtPath = pRoot->Mount->NtPath + L"\\";
if (UseRamDisk) // ram disk is shared so individualize the folder names
TargetNtPath += boxname;
else
TargetNtPath += SBIEDISK_LABEL;

HANDLE handle = OpenOrCreateNtFolder(TargetNtPath.c_str());
if (!handle)
errlvl = 0x12;
Expand Down Expand Up @@ -1085,7 +1085,7 @@ void MountManager::LockBoxRoot(const WCHAR* reg_root, ULONG session_id)
auto I = m_RootMap.find(reg_root);
if (I != m_RootMap.end()) {
// SbieApi_LogEx(session_id, 2201, L"LockBoxRoot %S", reg_root);
I->second->InUse = false;
I->second->InUse = true;
}

LeaveCriticalSection(&m_CritSec);
Expand Down

0 comments on commit 2542351

Please sign in to comment.