diff --git a/src/libs/antares/study/study.cpp b/src/libs/antares/study/study.cpp index 64b954f172..1be10d54d6 100644 --- a/src/libs/antares/study/study.cpp +++ b/src/libs/antares/study/study.cpp @@ -1541,21 +1541,5 @@ void Study::computePThetaInfForThermalClusters() const } } } - -void Study::deleteDeprecatedFiles(uint previousVersion) -{ - if (previousVersion < 870) - { - const std::string filePath(folderInput + "/hydro/common/capacity/"); - areas.each( - [&filePath](const Area& area) - { - const std::string fileName(filePath + "maxpower_" + area.id + ".txt"); - if (bool exist = IO::File::Exists(fileName); exist) - IO::File::Delete(fileName); - }); - } -} - } // namespace Antares::Data diff --git a/src/libs/antares/study/study.h b/src/libs/antares/study/study.h index 8d949d9bd3..d52b587604 100644 --- a/src/libs/antares/study/study.h +++ b/src/libs/antares/study/study.h @@ -449,12 +449,6 @@ class Study: public Yuni::NonCopyable, public IObject, public LayerData void removeTimeseriesIfTSGeneratorEnabled(); //@} - /*! - ** \brief Delete deprecated files when upgrading a study - */ - void deleteDeprecatedFiles(uint previousVersion); - //@} - //! \name //@{ /*! diff --git a/src/tools/updater/main.cpp b/src/tools/updater/main.cpp index b190deda8f..4650493f7d 100644 --- a/src/tools/updater/main.cpp +++ b/src/tools/updater/main.cpp @@ -93,12 +93,7 @@ class MyStudyFinder final : public Data::StudyFinder study->parameters.readonly = true; logs.info() << "Saving..."; - - uint tempVersionVar = (uint)study->header.version; - bool isSaved = study->saveToFolder(folder); - - if (isSaved && (tempVersionVar != Antares::Data::versionLatest)) - study->deleteDeprecatedFiles(tempVersionVar); + study->saveToFolder(folder); } else { diff --git a/src/ui/simulator/application/study.cpp b/src/ui/simulator/application/study.cpp index af50b9325d..bb51370a2b 100644 --- a/src/ui/simulator/application/study.cpp +++ b/src/ui/simulator/application/study.cpp @@ -393,11 +393,7 @@ class JobSaveStudy final : public Toolbox::Jobs::Job } // save as // Save the study (only changes in the most cases) - uint tempVersionVar = study->header.version; - bool isSaved = study->saveToFolder(pFolder); - - if (isSaved && (tempVersionVar != Antares::Data::versionLatest)) - study->deleteDeprecatedFiles(tempVersionVar); + study->saveToFolder(pFolder); // Scenario Builder if (pCanReleaseScenarioBuilder && study->scenarioRules)