From c13f06e4a60c0ef38d4dae6a12e252d12b5718e0 Mon Sep 17 00:00:00 2001 From: Xiao Qi Date: Mon, 30 Jan 2023 19:55:42 +0800 Subject: [PATCH] Added warning line to check for existing path --- SHADE_Engine/src/Filesystem/SHFileSystem.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/SHADE_Engine/src/Filesystem/SHFileSystem.cpp b/SHADE_Engine/src/Filesystem/SHFileSystem.cpp index a28f70ca..cbcbd45b 100644 --- a/SHADE_Engine/src/Filesystem/SHFileSystem.cpp +++ b/SHADE_Engine/src/Filesystem/SHFileSystem.cpp @@ -105,6 +105,12 @@ namespace SHADE std::vector assets; // 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)) { auto path = dirEntry.path();