From: Arnaud Giersch Date: Wed, 20 Feb 2019 22:02:48 +0000 (+0100) Subject: Don't strip last component of cwd. X-Git-Tag: v3_22~273^2~1 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/b4e4d734420d18937b9550d50fcaed5700ec68cb Don't strip last component of cwd. --- diff --git a/src/surf/xml/surfxml_sax_cb.cpp b/src/surf/xml/surfxml_sax_cb.cpp index 7d7bf77705..333c2e7f28 100644 --- a/src/surf/xml/surfxml_sax_cb.cpp +++ b/src/surf/xml/surfxml_sax_cb.cpp @@ -991,11 +991,12 @@ void surf_parse_open(const std::string& file) surf_parsed_filename = file; std::string dir = simgrid::xbt::Path(file).get_dir_name(); surf_path.push_back(dir); - std::string cwd = simgrid::xbt::Path().get_dir_name(); surf_file_to_parse = surf_fopen(file, "r"); - if (surf_file_to_parse == nullptr) + if (surf_file_to_parse == nullptr) { + std::string cwd = simgrid::xbt::Path().get_name(); xbt_die("Unable to open '%s' from '%s'\n", file.c_str(), cwd.c_str()); + } surf_input_buffer = surf_parse__create_buffer(surf_file_to_parse, YY_BUF_SIZE); surf_parse__switch_to_buffer(surf_input_buffer); surf_parse_lineno = 1;