Fixed xe::filesystem::DeleteFolder on Windows. Should fix some issues where games tried to overwrite existing content such as saves and was failing.

This commit is contained in:
gibbed 2017-01-09 17:05:05 -06:00
parent 61cb3093ce
commit ac7dce758b
1 changed files with 1 additions and 1 deletions

View File

@ -34,7 +34,7 @@ bool CreateFolder(const std::wstring& path) {
} }
bool DeleteFolder(const std::wstring& path) { bool DeleteFolder(const std::wstring& path) {
auto double_null_path = path + L"\0"; auto double_null_path = path + std::wstring(L"\0", 1);
SHFILEOPSTRUCT op = {0}; SHFILEOPSTRUCT op = {0};
op.wFunc = FO_DELETE; op.wFunc = FO_DELETE;
op.pFrom = double_null_path.c_str(); op.pFrom = double_null_path.c_str();