This commit is contained in:
DavidXanatos 2023-08-26 22:15:32 +02:00
parent c5304c58a0
commit 254235136f
2 changed files with 13 additions and 10 deletions

View File

@ -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

View File

@ -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();
@ -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;
@ -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);