Browse Source

add define for Windows

Co-authored-by: Ivan Savenko <[email protected]>
kdmcser 6 months ago
parent
commit
8d25748dba
1 changed files with 5 additions and 1 deletions
  1. 5 1
      lib/filesystem/CFilesystemLoader.cpp

+ 5 - 1
lib/filesystem/CFilesystemLoader.cpp

@@ -93,7 +93,11 @@ bool CFilesystemLoader::createResource(const std::string & requestedFilename, bo
 	}
 
 	filename = filename.substr(mountPoint.size());
-	std::wstring filePath = boost::locale::conv::utf_to_utf<wchar_t>(filename);
+#ifdef VCMI_WINDOWS
+			boost::filesystem::path filePath(boost::locale::conv::utf_to_utf<wchar_t>(filename));
+#else
+			boost::filesystem::path filePath(filename.string());
+#endif
 
 	if (!update)
 	{