mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#2086 Handle extended file name chars on Linux for eclipse cases and summary cases
This commit is contained in:
@@ -26,6 +26,7 @@
|
||||
|
||||
#include "RifEclipseOutputFileTools.h"
|
||||
#include "RifReaderSettings.h"
|
||||
#include "RifStringTools.h"
|
||||
|
||||
#include "ert/ecl/ecl_file.h"
|
||||
#include "ert/ecl/ecl_kw_magic.h"
|
||||
@@ -83,7 +84,7 @@ bool RifEclipseUnifiedRestartFileAccess::openFile()
|
||||
|
||||
if (resultFileInfo.lastModified() < indexFileInfo.lastModified())
|
||||
{
|
||||
m_ecl_file = ecl_file_fast_open(m_filename.toAscii().data(), indexFileName.toAscii().data(), ECL_FILE_CLOSE_STREAM);
|
||||
m_ecl_file = ecl_file_fast_open(RifStringTools::toNativeEncoded(m_filename).data(), RifStringTools::toNativeEncoded(indexFileName).data(), ECL_FILE_CLOSE_STREAM);
|
||||
if (!m_ecl_file)
|
||||
{
|
||||
RiaLogging::error(QString("Failed to open file %1 using index file.").arg(m_filename));
|
||||
@@ -99,7 +100,7 @@ bool RifEclipseUnifiedRestartFileAccess::openFile()
|
||||
|
||||
if (!m_ecl_file)
|
||||
{
|
||||
m_ecl_file = ecl_file_open(m_filename.toAscii().data(), ECL_FILE_CLOSE_STREAM);
|
||||
m_ecl_file = ecl_file_open(RifStringTools::toNativeEncoded(m_filename).data(), ECL_FILE_CLOSE_STREAM);
|
||||
if (!m_ecl_file)
|
||||
{
|
||||
RiaLogging::error(QString("Failed to open file %1").arg(m_filename));
|
||||
@@ -112,7 +113,7 @@ bool RifEclipseUnifiedRestartFileAccess::openFile()
|
||||
QString resultPath = fi.absolutePath();
|
||||
if (caf::Utils::isFolderWritable(resultPath))
|
||||
{
|
||||
bool success = ecl_file_write_index(m_ecl_file, indexFileName.toAscii().data());
|
||||
bool success = ecl_file_write_index(m_ecl_file, RifStringTools::toNativeEncoded(indexFileName).data());
|
||||
|
||||
if (success)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user