#include "simdag_private.hpp"
#include "simgrid/simdag.h"
#include "src/internal_config.h"
-#include "xbt/file.h"
+#include "xbt/file.hpp"
#include <cstring>
#include <unordered_map>
}
if (result && not acyclic_graph_detail(result)) {
- char* base = xbt_basename(filename);
- XBT_ERROR("The DOT described in %s is not a DAG. It contains a cycle.", base);
- free(base);
+ std::string base = simgrid::xbt::Path(filename).getBasename();
+ XBT_ERROR("The DOT described in %s is not a DAG. It contains a cycle.", base.c_str());
xbt_dynar_free(&result);
result = nullptr;
}