feat(util/lean_path): normalize path in function dirname

This commit is contained in:
Leonardo de Moura 2014-09-20 10:50:28 -07:00
parent ee4255eb3d
commit e3ac1f66e0

View file

@ -255,6 +255,8 @@ void display_path(std::ostream & out, std::string const & fname) {
std::string dirname(char const * fname) {
if (fname == nullptr)
return ".";
std::string nfname = normalize_path(std::string(fname));
fname = nfname.c_str();
unsigned i = 0;
unsigned last_sep = 0;
bool found_sep = false;