swift-foundation icon indicating copy to clipboard operation
swift-foundation copied to clipboard

FoundationEssentials: avoid precondition failure on Windows

Open compnerd opened this issue 1 month ago • 4 comments

Repair the error reporting on Windows in the case of a failure in SHGetKnownFolder - the returned value is a HRESULT, which is the extended error code unlike the Win32 APIs which return a BOOL.

The "Recyle Bin" is a virtual folder and does not have an associated path with the folder that we can query. Undo the implementation here for the time being to avoid the assertion failure in the runtime.

compnerd avatar May 15 '24 14:05 compnerd