From d19c2563331e13b047a47422d31ec486619b72ec Mon Sep 17 00:00:00 2001 From: Magne Sjaastad Date: Fri, 25 Aug 2017 11:08:19 +0200 Subject: [PATCH] #1768 Create index file name based on result file name --- .../FileInterface/RifEclipseOutputFileTools.cpp | 12 ++++++++++++ .../FileInterface/RifEclipseOutputFileTools.h | 1 + 2 files changed, 13 insertions(+) diff --git a/ApplicationCode/FileInterface/RifEclipseOutputFileTools.cpp b/ApplicationCode/FileInterface/RifEclipseOutputFileTools.cpp index a562932270..34d0e597c3 100644 --- a/ApplicationCode/FileInterface/RifEclipseOutputFileTools.cpp +++ b/ApplicationCode/FileInterface/RifEclipseOutputFileTools.cpp @@ -371,6 +371,18 @@ cvf::ref RifEclipseOutputFileTools::createDynamicRe return resultsAccess; } +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +QString RifEclipseOutputFileTools::createIndexFileName(const QString& resultFileName) +{ + QFileInfo fi(resultFileName); + + QString indexFileName = fi.path() + "/" + fi.completeBaseName() + ".RESINSIGHT_IDX"; + + return indexFileName; +} + //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationCode/FileInterface/RifEclipseOutputFileTools.h b/ApplicationCode/FileInterface/RifEclipseOutputFileTools.h index cafb60a05f..eb05876902 100644 --- a/ApplicationCode/FileInterface/RifEclipseOutputFileTools.h +++ b/ApplicationCode/FileInterface/RifEclipseOutputFileTools.h @@ -67,6 +67,7 @@ public: static cvf::ref createDynamicResultAccess(const QString& fileName); + static QString createIndexFileName(const QString& resultFileName); private: static void createReportStepsMetaData(std::vector ecl_files, std::vector* reportSteps);