| 1335 | |
| 1336 | |
| 1337 | ResultType Line::FileRecycleEmpty(LPTSTR aDriveLetter) |
| 1338 | { |
| 1339 | LPCTSTR szPath = *aDriveLetter ? aDriveLetter : NULL; |
| 1340 | HRESULT hr = SHEmptyRecycleBin(NULL, szPath, SHERB_NOCONFIRMATION | SHERB_NOPROGRESSUI | SHERB_NOSOUND); |
| 1341 | // Throw no error for E_UNEXPECTED, since that is returned in the common case where the |
| 1342 | // recycle bin is already empty. Seems more useful and user-friendly to ignore it. |
| 1343 | if (hr != S_OK && hr != E_UNEXPECTED) |
| 1344 | return g_script.Win32Error(hr); |
| 1345 | return OK; |
| 1346 | } |
| 1347 | |
| 1348 | |
| 1349 |
nothing calls this directly
no test coverage detected