Skip to content
This repository was archived by the owner on Nov 11, 2022. It is now read-only.

Commit 917ada8

Browse files
committed
Merge pull request #22 from jpgaribotti/master
Improvements in Citrix environment
2 parents 41a94a1 + e109ba7 commit 917ada8

12 files changed

Lines changed: 224 additions & 318 deletions

DriveFusion/DriveItemPropertyStore.cpp

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -64,21 +64,14 @@ void CDriveItemPropertyStore::FinalRelease()
6464

6565
HRESULT CDriveItemPropertyStore::_Initialize(const PROPERTYKEY *rgKeys, UINT cKeys, GETPROPERTYSTOREFLAGS flags, CGDriveShlExt* gDriveShlExt, PCUITEMID_CHILD pidl)
6666
{
67+
HRESULT hr = S_OK;
6768
Log::WriteOutput(LogType::Debug, L"CDriveItemPropertyStore::_Initialize(const PROPERTYKEY *rgKeys, UINT cKeys, GETPROPERTYSTOREFLAGS flags, __in IShellFolder *psf, PCUITEMID_CHILD pidl)");
6869

69-
HRESULT hr = CIdList::CloneChild(pidl, _cpidl);
70-
71-
if (SUCCEEDED(hr))
72-
{
73-
_gDriveShlExt = gDriveShlExt;
74-
75-
hr = _InitializePropertyStore(rgKeys, cKeys, flags);
76-
77-
if (SUCCEEDED(hr))
78-
{
79-
_gDriveShlExt->AddRef();
80-
}
81-
}
70+
CHECK_HR(CIdList::CloneChild(pidl, _cpidl));
71+
72+
_gDriveShlExt = gDriveShlExt;
73+
CHECK_HR(_InitializePropertyStore(rgKeys, cKeys, flags));
74+
_gDriveShlExt->AddRef();
8275

8376
return hr;
8477
}

DriveFusion/DriveItemPropertyStoreFactory.cpp

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -65,17 +65,15 @@ void CDriveItemPropertyStoreFactory::FinalRelease()
6565

6666
HRESULT CDriveItemPropertyStoreFactory::_Initialize(CGDriveShlExt* gDriveShlExt, PCUITEMID_CHILD pidl)
6767
{
68+
HRESULT hr = S_OK;
6869
Log::WriteOutput(LogType::Debug, L"CDriveItemPropertyStoreFactory::_Initialize()");
6970

70-
HRESULT hr = CIdList::CloneChild(pidl, _cpidl);
71-
72-
if (SUCCEEDED(hr))
73-
{
74-
_gDriveShlExt = gDriveShlExt;
71+
CHECK_HR(CIdList::CloneChild(pidl, _cpidl));
7572

76-
_gDriveShlExt->AddRef();
77-
}
78-
return S_OK;
73+
_gDriveShlExt = gDriveShlExt;
74+
_gDriveShlExt->AddRef();
75+
76+
return hr;
7977
}
8078

8179
STDMETHODIMP CDriveItemPropertyStoreFactory::GetPropertyStore(GETPROPERTYSTOREFLAGS flags, __in_opt IUnknown * /*punkFactory*/, REFIID riid, __deref_out void **ppv)

DriveFusion/FileManager.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,8 +160,8 @@ FileInfo* FileManager::GetFile(std::wstring id, bool updateCache, bool getChildr
160160
// public function should all be locked
161161
Scoped_Lock serviceLock(&_mutex);
162162

163-
if (GetLog() == NULL)
164-
return NULL;
163+
if (GetLog() == nullptr)
164+
return nullptr;
165165

166166
if (IsRootId(id) && RootId.length() > 0)
167167
{

0 commit comments

Comments
 (0)