fixed: for deleting files and folders on Windows we have to call the Unicode variants of these functions.

This commit is contained in:
Christoph Oelckers 2024-05-01 09:47:58 +02:00
commit 81dade9ed5
6 changed files with 32 additions and 16 deletions

View file

@ -34,12 +34,6 @@
#ifndef _WIN32
#include <unistd.h>
#else
#include <direct.h>
#define rmdir _rmdir
#endif
#include <miniz.h>
@ -1215,11 +1209,11 @@ UNSAFE_CCMD(clearnodecache)
{
if (list[i].isDirectory)
{
rmdir(list[i].FilePath.c_str());
RemoveDir(list[i].FilePath.c_str());
}
else
{
remove(list[i].FilePath.c_str());
RemoveFile(list[i].FilePath.c_str());
}
}