Added warning line to check for existing path

This commit is contained in:
Xiao Qi 2023-01-30 19:55:42 +08:00
parent eedcd44b8e
commit c13f06e4a6
1 changed files with 6 additions and 0 deletions

View File

@ -105,6 +105,12 @@ namespace SHADE
std::vector<SHAsset> assets; std::vector<SHAsset> assets;
// Get all subfolders/files in this current folder // Get all subfolders/files in this current folder
if (!std::filesystem::exists(std::filesystem::path(folder->path)))
{
SHLOG_WARNING("[Asset Manager] Path to build directory does not exist!: {}", folder->path);
continue;
}
for (auto& dirEntry : std::filesystem::directory_iterator(folder->path)) for (auto& dirEntry : std::filesystem::directory_iterator(folder->path))
{ {
auto path = dirEntry.path(); auto path = dirEntry.path();