diff --git a/src/cross_sections.cpp b/src/cross_sections.cpp index 5d8d18c219..8ea59c1f08 100644 --- a/src/cross_sections.cpp +++ b/src/cross_sections.cpp @@ -402,6 +402,10 @@ void read_ce_cross_sections_xml() // If no directory is listed in cross_sections.xml, by default select the // directory in which the cross_sections.xml file resides auto pos = filename.rfind("/"); + if (pos == std::string::npos) { + // no '/' found, probably a Windows directory + pos = filename.rfind("\\"); + } directory = filename.substr(0, pos); }