From 6e067fd2ce174c432c3a2f0bcfee9685a5d225a3 Mon Sep 17 00:00:00 2001
From: Vincent Payet <vincent.payet@rte-france.com>
Date: Tue, 15 Oct 2024 14:59:45 +0200
Subject: [PATCH] prepro

---
 src/libs/antares/study/area/list.cpp                        | 6 +++---
 .../antares/study/include/antares/study/parts/load/prepro.h | 2 +-
 .../study/include/antares/study/parts/solar/prepro.h        | 2 +-
 .../antares/study/include/antares/study/parts/wind/prepro.h | 2 +-
 src/libs/antares/study/parts/load/prepro.cpp                | 2 +-
 src/libs/antares/study/parts/solar/prepro.cpp               | 2 +-
 src/libs/antares/study/parts/wind/prepro.cpp                | 2 +-
 7 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/src/libs/antares/study/area/list.cpp b/src/libs/antares/study/area/list.cpp
index 2d0350878f..1439e36198 100644
--- a/src/libs/antares/study/area/list.cpp
+++ b/src/libs/antares/study/area/list.cpp
@@ -900,7 +900,7 @@ static bool AreaListLoadFromFolderSingleArea(Study& study,
         {
             // if changes are required, please update reloadXCastData()
             fs::path loadPath = study.folderInput / "load" / "prepro" / area.id.to<std::string>();
-            ret = area.load.prepro->loadFromFolder(loadPath.string()) && ret;
+            ret = area.load.prepro->loadFromFolder(loadPath) && ret;
         }
         if (!options.loadOnlyNeeded || !area.load.prepro) // Series
         {
@@ -917,7 +917,7 @@ static bool AreaListLoadFromFolderSingleArea(Study& study,
         {
             // if changes are required, please update reloadXCastData()
             fs::path solarPath = study.folderInput / "solar" / "prepro" / area.id.to<std::string>();
-            ret = area.solar.prepro->loadFromFolder(solarPath.string()) && ret;
+            ret = area.solar.prepro->loadFromFolder(solarPath) && ret;
         }
         if (!options.loadOnlyNeeded || !area.solar.prepro) // Series
         {
@@ -973,7 +973,7 @@ static bool AreaListLoadFromFolderSingleArea(Study& study,
         {
             // if changes are required, please update reloadXCastData()
             fs::path windPath = study.folderInput / "wind" / "prepro" / area.id.to<std::string>();
-            ret = area.wind.prepro->loadFromFolder(windPath.string()) && ret;
+            ret = area.wind.prepro->loadFromFolder(windPath) && ret;
         }
         if (!options.loadOnlyNeeded || !area.wind.prepro) // Series
         {
diff --git a/src/libs/antares/study/include/antares/study/parts/load/prepro.h b/src/libs/antares/study/include/antares/study/parts/load/prepro.h
index f79d0dcf8f..9f3f037e4e 100644
--- a/src/libs/antares/study/include/antares/study/parts/load/prepro.h
+++ b/src/libs/antares/study/include/antares/study/parts/load/prepro.h
@@ -52,7 +52,7 @@ class Prepro
     /*!
     ** \brief Load data from a folder
     */
-    bool loadFromFolder(const std::string& folder);
+    bool loadFromFolder(const std::filesystem::path& folder);
 
     /*!
     ** \brief Save data to a folder
diff --git a/src/libs/antares/study/include/antares/study/parts/solar/prepro.h b/src/libs/antares/study/include/antares/study/parts/solar/prepro.h
index eb0348c9d6..e6f15d1d42 100644
--- a/src/libs/antares/study/include/antares/study/parts/solar/prepro.h
+++ b/src/libs/antares/study/include/antares/study/parts/solar/prepro.h
@@ -52,7 +52,7 @@ class Prepro
     /*!
     ** \brief Solar data from a folder
     */
-    bool loadFromFolder(const std::string& folder);
+    bool loadFromFolder(const std::filesystem::path& folder);
 
     /*!
     ** \brief Save data to a folder
diff --git a/src/libs/antares/study/include/antares/study/parts/wind/prepro.h b/src/libs/antares/study/include/antares/study/parts/wind/prepro.h
index 3b18527d58..c62669d0a6 100644
--- a/src/libs/antares/study/include/antares/study/parts/wind/prepro.h
+++ b/src/libs/antares/study/include/antares/study/parts/wind/prepro.h
@@ -49,7 +49,7 @@ class Prepro
     /*!
     ** \brief Load data from a folder
     */
-    bool loadFromFolder(const std::string& folder);
+    bool loadFromFolder(const std::filesystem::path& folder);
 
     /*!
     ** \brief Save data to a folder
diff --git a/src/libs/antares/study/parts/load/prepro.cpp b/src/libs/antares/study/parts/load/prepro.cpp
index 1efbfc0164..b5a5342c82 100644
--- a/src/libs/antares/study/parts/load/prepro.cpp
+++ b/src/libs/antares/study/parts/load/prepro.cpp
@@ -38,7 +38,7 @@ Prepro::~Prepro()
 {
 }
 
-bool Prepro::loadFromFolder(const std::string& folder)
+bool Prepro::loadFromFolder(const std::filesystem::path& folder)
 {
     return xcast.loadFromFolder(folder);
 }
diff --git a/src/libs/antares/study/parts/solar/prepro.cpp b/src/libs/antares/study/parts/solar/prepro.cpp
index 502a83a22f..0e3af8f016 100644
--- a/src/libs/antares/study/parts/solar/prepro.cpp
+++ b/src/libs/antares/study/parts/solar/prepro.cpp
@@ -43,7 +43,7 @@ Prepro::~Prepro()
 {
 }
 
-bool Prepro::loadFromFolder(const std::string& folder)
+bool Prepro::loadFromFolder(const std::filesystem::path& folder)
 {
     return xcast.loadFromFolder(folder);
 }
diff --git a/src/libs/antares/study/parts/wind/prepro.cpp b/src/libs/antares/study/parts/wind/prepro.cpp
index 7c8231c301..fd449e61a1 100644
--- a/src/libs/antares/study/parts/wind/prepro.cpp
+++ b/src/libs/antares/study/parts/wind/prepro.cpp
@@ -35,7 +35,7 @@ Prepro::~Prepro()
 {
 }
 
-bool Prepro::loadFromFolder(const std::string& folder)
+bool Prepro::loadFromFolder(const std::filesystem::path& folder)
 {
     return xcast.loadFromFolder(folder);
 }