mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 10:04:49 +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 */
|
||||
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]);
|
||||
#endif
|
||||
|
||||
/* Skip namespace (if any): "\\.\" or "\\?\" */
|
||||
if (szVolume[0] == '\\' &&
|
||||
|
@ -130,7 +138,7 @@ STDMETHODIMP RecycleBinGeneric::EmptyRecycleBin()
|
|||
if (dwLogicalDrives == 0)
|
||||
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)))
|
||||
continue;
|
||||
|
|
Loading…
Reference in a new issue