Skip to content

Commit

Permalink
#10720 Summary Import: support upper/lower case mismatch between file…
Browse files Browse the repository at this point in the history
…name and extension.

Importing files with different casing in base name and extension would fail when
using libecl summary reader. E.g "norne_atw2013.SMSPEC" would fail since libecl
forces the extension to be lower case even though it is given the actual extension.

Removing the lowercasing allows more flexibility in the file naming.

The problem only occurs when the libecl summary reader is used, the opm-common
can already import these files.

Fixes #10720.
Fixes #10617.
  • Loading branch information
kriben committed Oct 20, 2023
1 parent 55400b6 commit 27785da
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions ThirdParty/Ert/lib/ecl/ecl_util.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -457,11 +457,6 @@ static char * ecl_util_alloc_filename_static(const char * path, const char * bas
ext = NULL;
}

if (!upper_case) {
for (size_t i=0; i < strlen(ext); i++)
ext[i] = tolower(ext[i]);
}

filename = util_alloc_filename(path , base , ext);
free(ext);

Expand Down Expand Up @@ -662,11 +657,6 @@ int ecl_util_select_filelist( const char * path , const char * base , ecl_file_e
char * ext_pattern = util_alloc_string_copy(ecl_util_get_file_pattern( file_type , fmt_file ));
char * file_pattern;

if (!upper_case) {
for (size_t i=0; i < strlen(ext_pattern); i++)
ext_pattern[i] = tolower(ext_pattern[i]);
}

if (base)
file_pattern = util_alloc_filename(NULL , base, ext_pattern);
else
Expand Down

0 comments on commit 27785da

Please sign in to comment.