diff --git a/src/libs/antares/file-tree-study-loader/FileTreeStudyLoader.cpp b/src/libs/antares/file-tree-study-loader/FileTreeStudyLoader.cpp index 92b8691d83..9dd0b722cb 100644 --- a/src/libs/antares/file-tree-study-loader/FileTreeStudyLoader.cpp +++ b/src/libs/antares/file-tree-study-loader/FileTreeStudyLoader.cpp @@ -29,7 +29,7 @@ namespace Antares { FileTreeStudyLoader::FileTreeStudyLoader(std::filesystem::path study_path): - study_path_{std::move(study_path)} + study_path_{std::move(study_path.string())} { } @@ -38,10 +38,7 @@ std::unique_ptr FileTreeStudyLoader::load() const using namespace std::literals::string_literals; Antares::Solver::Application application; constexpr unsigned int argc = 3; - // On Windows, std::filesystem::path::value_type is wchar_t - std::array argv{"", - reinterpret_cast(study_path_.c_str()), - "--parallel"}; + std::array argv{"", study_path_.c_str(), "--parallel"}; application.prepare(argc, argv.data()); return application.acquireStudy(); diff --git a/src/libs/antares/file-tree-study-loader/include/antares/file-tree-study-loader/FileTreeStudyLoader.h b/src/libs/antares/file-tree-study-loader/include/antares/file-tree-study-loader/FileTreeStudyLoader.h index 7b46a95c3a..fc207c1a4c 100644 --- a/src/libs/antares/file-tree-study-loader/include/antares/file-tree-study-loader/FileTreeStudyLoader.h +++ b/src/libs/antares/file-tree-study-loader/include/antares/file-tree-study-loader/FileTreeStudyLoader.h @@ -58,6 +58,6 @@ class FileTreeStudyLoader: public IStudyLoader [[nodiscard]] std::unique_ptr load() const override; private: - std::filesystem::path study_path_; + std::string study_path_; }; } // namespace Antares