Commit e5c5f076 authored by Kilian Lackhove's avatar Kilian Lackhove

Merge branch 'fix/FC-trailingSep' into 'master'

Allow passing input name with trailing separator to FC

See merge request !879
parents ded2bb02 28cc28eb
......@@ -89,6 +89,9 @@ v4.4.2
- Fix sign of the viscous term in the velocity correction scheme equations in
the user guide (!856)
**FieldConvert**
- Allow passing input name with trailing separator (!879)
v4.4.1
------
**Library**
......
......@@ -36,6 +36,7 @@
#include <string>
#include <boost/algorithm/string.hpp>
#include <boost/program_options.hpp>
#include <LibUtilities/BasicUtils/FileSystem.h>
#include <LibUtilities/BasicUtils/Timer.h>
#include <FieldUtils/Module.h>
......@@ -327,6 +328,13 @@ int main(int argc, char* argv[])
int dot = tmp1[0].find_last_of('.') + 1;
string ext = tmp1[0].substr(dot, tmp1[0].length() - dot);
// Remove trailing separator from extension to allow
// folder inputs using file.fld/
if(ext.back() == fs::path::preferred_separator)
{
ext.pop_back();
}
if(ext == "gz")
{
string tmp2 = tmp1[0].substr(0,dot-1);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment