From 30976b3ffc609605744e37d6ae20482a961a75c9 Mon Sep 17 00:00:00 2001
From: Jacki <jacki@thejackimonster.de>
Date: Mon, 16 Sep 2024 22:53:00 +0200
Subject: [PATCH] Fix path and string usage in asset loader

Signed-off-by: Jacki <jacki@thejackimonster.de>
---
 modules/asset_loader/src/vkcv/asset/asset_loader.cpp | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/modules/asset_loader/src/vkcv/asset/asset_loader.cpp b/modules/asset_loader/src/vkcv/asset/asset_loader.cpp
index 5c868b73..c6421b8e 100644
--- a/modules/asset_loader/src/vkcv/asset/asset_loader.cpp
+++ b/modules/asset_loader/src/vkcv/asset/asset_loader.cpp
@@ -16,8 +16,10 @@ namespace vkcv::asset {
 	 * @param e	The exception being thrown
 	 * @param path	The path to the file that was responsible for the exception
 	 */
-	static void recurseExceptionPrint(const std::exception& e, const std::string &path) {
-		vkcv_log(LogLevel::ERROR, "Loading file %s: %s", path.string().c_str(), e.what());
+	static void recurseExceptionPrint(const std::exception& e, 
+																		const std::filesystem::path& path) {
+		vkcv_log(LogLevel::ERROR, "Loading file %s: %s",
+						 path.string().c_str(), e.what());
 		
 		try {
 			std::rethrow_if_nested(e);
@@ -537,10 +539,10 @@ namespace vkcv::asset {
 				);
 			}
 		} catch (const std::system_error& err) {
-			recurseExceptionPrint(err, path.string());
+			recurseExceptionPrint(err, path);
 			return ASSET_ERROR;
 		} catch (const std::exception& e) {
-			recurseExceptionPrint(e, path.string());
+			recurseExceptionPrint(e, path);
 			return ASSET_ERROR;
 		}
 		
-- 
GitLab