Author: gadamopoulos
Date: Fri Aug 25 08:44:13 2017
New Revision: 75665
URL:
http://svn.reactos.org/svn/reactos?rev=75665&view=rev
Log:
[SHELL32] -CRecycleBin: Call GetDriveTypeW with correct parameters. Now files can be
deleted to the recycle bin again. Patch by Serge Gautherie. CORE-12340
Modified:
trunk/reactos/dll/win32/shell32/folders/CRecycleBin.cpp
Modified: trunk/reactos/dll/win32/shell32/folders/CRecycleBin.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/folders/…
==============================================================================
--- trunk/reactos/dll/win32/shell32/folders/CRecycleBin.cpp [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shell32/folders/CRecycleBin.cpp [iso-8859-1] Fri Aug 25
08:44:13 2017
@@ -885,13 +885,19 @@
return FALSE;
}
- if (GetDriveTypeW(wszPath) != DRIVE_FIXED)
+ // Only keep the base path.
+ WCHAR wszRootPathName[MAX_PATH];
+ strcpyW(wszRootPathName, wszPath);
+ PathRemoveFileSpecW(wszRootPathName);
+ PathAddBackslashW(wszRootPathName);
+
+ if (GetDriveTypeW(wszRootPathName) != DRIVE_FIXED)
{
/* no bitbucket on removable media */
return FALSE;
}
- if (!GetVolumeInformationW(wszPath, NULL, 0, &VolSerialNumber,
&MaxComponentLength, &FileSystemFlags, NULL, 0))
+ if (!GetVolumeInformationW(wszRootPathName, NULL, 0, &VolSerialNumber,
&MaxComponentLength, &FileSystemFlags, NULL, 0))
{
ERR("GetVolumeInformationW failed with %u\n", GetLastError());
return FALSE;