From a745a410c4f2dab313b55307205daee2b0087461 Mon Sep 17 00:00:00 2001 From: Xiao Qi Date: Mon, 31 Oct 2022 14:41:28 +0800 Subject: [PATCH] File path bug fixed --- Assimp Compile Application/src/main.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Assimp Compile Application/src/main.cpp b/Assimp Compile Application/src/main.cpp index 5691b98..de1ab95 100644 --- a/Assimp Compile Application/src/main.cpp +++ b/Assimp Compile Application/src/main.cpp @@ -12,6 +12,7 @@ #include #include +#include int main(int argc, char* argv[]) { @@ -21,17 +22,21 @@ int main(int argc, char* argv[]) { if (std::filesystem::is_directory(ASSET_ROOT)) { - for (auto const& dir : std::filesystem::recursive_directory_iterator{ "./Assets/" }) + for (auto& dir : + std::filesystem::recursive_directory_iterator{ ASSET_ROOT }) { if (dir.path().extension().string() == GLTF_EXTENSION || dir.path().extension().string() == FBX_EXTENSION) { - paths.push_back(dir.path().string()); + auto path = dir.path(); + path.make_preferred(); + paths.push_back(path.string()); } } } else { + std::cout << "Default path not found!" << std::endl; return 1; } }