mirror of
https://github.com/reactos/reactos.git
synced 2024-07-14 00:25:05 +00:00
[SHELL32] -CRecycleBin: Call GetDriveTypeW with correct parameters. Now files can be deleted to the recycle bin again. Patch by Serge Gautherie. CORE-12340
svn path=/trunk/; revision=75665
This commit is contained in:
parent
a28235c709
commit
19c1694e55
|
@ -885,13 +885,19 @@ TRASH_CanTrashFile(LPCWSTR wszPath)
|
|||
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;
|
||||
|
|
Loading…
Reference in a new issue