Fix regression in win32 filesystem api using potential substring of StringView

#516 #510
This commit is contained in:
Wojtek Figat
2021-05-12 10:19:31 +02:00
parent 2c51f79c0a
commit a8f0035b8b
2 changed files with 40 additions and 25 deletions

View File

@@ -233,7 +233,7 @@ bool ShaderCacheManagerService::Init()
{
LOG(Warning, "Shaders cache database is invalid. Performing reset.");
if (FileSystem::DeleteDirectory(rootDir))
if (FileSystem::DirectoryExists(rootDir) && FileSystem::DeleteDirectory(rootDir))
{
LOG(Warning, "Failed to reset the shaders cache database.");
}