diff --git a/PanelSwCustomActions/FileEntry.cpp b/PanelSwCustomActions/FileEntry.cpp index e1f9e57..2305aa0 100644 --- a/PanelSwCustomActions/FileEntry.cpp +++ b/PanelSwCustomActions/FileEntry.cpp @@ -135,7 +135,7 @@ CFileEntry::CFileEntry(const CFileEntry& other) } } -CFileEntry::CFileEntry(CFileEntry&& other) +CFileEntry::CFileEntry(CFileEntry&& other) noexcept { _szPath.Attach(other._szPath.Detach()); _szParentPath.Attach(other._szParentPath.Detach()); @@ -177,7 +177,7 @@ CFileEntry& CFileEntry::operator=(CFileEntry& other) return *this; } -CFileEntry& CFileEntry::operator=(CFileEntry&& other) +CFileEntry& CFileEntry::operator=(CFileEntry&& other) noexcept { _szPath.Attach(other._szPath.Detach()); _szParentPath.Attach(other._szParentPath.Detach()); diff --git a/PanelSwCustomActions/FileEntry.h b/PanelSwCustomActions/FileEntry.h index 4092b7a..09d02c1 100644 --- a/PanelSwCustomActions/FileEntry.h +++ b/PanelSwCustomActions/FileEntry.h @@ -11,9 +11,9 @@ class CFileEntry CFileEntry(LPCWSTR szPath); CFileEntry(const WIN32_FIND_DATA& findData, LPCWSTR szBasePath); CFileEntry(const CFileEntry& other); - CFileEntry(CFileEntry&& other); + CFileEntry(CFileEntry&& other) noexcept; CFileEntry& operator=(CFileEntry& other); - CFileEntry& operator=(CFileEntry&& other); + CFileEntry& operator=(CFileEntry&& other) noexcept; // Attribute tests DWORD Attributes() const; diff --git a/PanelSwCustomActions/FileIterator.cpp b/PanelSwCustomActions/FileIterator.cpp index 1df98b4..f04c542 100644 --- a/PanelSwCustomActions/FileIterator.cpp +++ b/PanelSwCustomActions/FileIterator.cpp @@ -54,7 +54,7 @@ CFileEntry CFileIterator::Find(LPCWSTR szBasePath, LPCWSTR szPattern, bool bRecu // We're searching without filespec wildcard pattern so we can match subfolders _hFind = ::FindFirstFile(szBasePattern, &_findData); - ExitOnInvalidHandleWithLastError(_hFind, _hrStatus, "Failed to find files in '%ls'"); + ExitOnInvalidHandleWithLastError(_hFind, _hrStatus, "Failed to find files in '%ls'", szBasePath); return ProcessFindData(); diff --git a/PanelSwCustomActions/PanelSwCustomActions.vcxproj b/PanelSwCustomActions/PanelSwCustomActions.vcxproj index d2e3212..c2e9ee1 100755 --- a/PanelSwCustomActions/PanelSwCustomActions.vcxproj +++ b/PanelSwCustomActions/PanelSwCustomActions.vcxproj @@ -185,6 +185,9 @@ True + + True + diff --git a/PanelSwCustomActions/ReparsePoint.cpp b/PanelSwCustomActions/ReparsePoint.cpp index 2b5d6ec..9e6595d 100644 --- a/PanelSwCustomActions/ReparsePoint.cpp +++ b/PanelSwCustomActions/ReparsePoint.cpp @@ -476,6 +476,7 @@ HRESULT CReparsePoint::DeleteReparsePoint(LPCWSTR szPath, LPVOID pBuffer, DWORD { ::CloseHandle(hFile); } + ReleaseMem(pCurrReparseData) return hr; }