mirror of
https://github.com/reactos/reactos.git
synced 2025-08-01 19:43:33 +00:00
Follow-up of #7169 JIRA issue: CORE-19595 - Revert some code in RecycleBinGeneric::DeleteFile.
This commit is contained in:
parent
7dd081e945
commit
73e7956563
1 changed files with 9 additions and 1 deletions
|
@ -97,7 +97,15 @@ STDMETHODIMP RecycleBinGeneric::DeleteFile(LPCWSTR szFileName)
|
||||||
|
|
||||||
/* Get associated volume path */
|
/* Get associated volume path */
|
||||||
WCHAR szVolume[MAX_PATH];
|
WCHAR szVolume[MAX_PATH];
|
||||||
|
#ifndef __REACTOS__
|
||||||
|
if (!GetVolumePathNameW(szFullName, szVolume, _countof(szVolume)))
|
||||||
|
{
|
||||||
|
CoTaskMemFree(szFullName);
|
||||||
|
return HRESULT_FROM_WIN32(GetLastError());
|
||||||
|
}
|
||||||
|
#else
|
||||||
swprintf(szVolume, L"%c:\\", szFullName[0]);
|
swprintf(szVolume, L"%c:\\", szFullName[0]);
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Skip namespace (if any): "\\.\" or "\\?\" */
|
/* Skip namespace (if any): "\\.\" or "\\?\" */
|
||||||
if (szVolume[0] == '\\' &&
|
if (szVolume[0] == '\\' &&
|
||||||
|
@ -130,7 +138,7 @@ STDMETHODIMP RecycleBinGeneric::EmptyRecycleBin()
|
||||||
if (dwLogicalDrives == 0)
|
if (dwLogicalDrives == 0)
|
||||||
return HRESULT_FROM_WIN32(GetLastError());
|
return HRESULT_FROM_WIN32(GetLastError());
|
||||||
|
|
||||||
for (DWORD i = 0; i < L'Z' - L'A' + 1; i++)
|
for (DWORD i = 0; i < 'Z' - 'A' + 1; i++)
|
||||||
{
|
{
|
||||||
if (!(dwLogicalDrives & (1 << i)))
|
if (!(dwLogicalDrives & (1 << i)))
|
||||||
continue;
|
continue;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue