Commit f375a1b2 authored by Arne Graf's avatar Arne Graf

fixed bug if no directory in geofilename

parent 1780bf6a
......@@ -289,7 +289,9 @@ void DirectionFloorfield::Init(Building* building, double stepsize, double thres
//implement mechanic, that can read-in an existing floorfield (from a previous run)
string s = building->GetGeometryFilename();
s.erase(s.find_last_of(".", string::npos)); // delete ending
s.erase(0, s.find_last_of("/")+1); // delete directories before filename (espacially "..")
if (s.find_last_of("/") != string::npos) {
s.erase(0, s.find_last_of("/")+1); // delete directories before filename (espacially "..")
}
string FF_filename = (building->GetProjectRootDir() + "FF_" + s + "_" + std::to_string(threshold) + ".vtk").c_str();
std::ifstream test(FF_filename);
if (test.good()) {
......
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