Commit 602e27fe authored by LEFEBVREJP email's avatar LEFEBVREJP email
Browse files

Merge branch 'windows_get_paths' into 'master'

get_paths on windows

See merge request !81
parents d347f7d4 943ee4df
Pipeline #67180 passed with stages
in 18 minutes and 17 seconds
......@@ -276,6 +276,19 @@ bool get_paths(const std::string &spec, std::vector<std::string> &paths,
paths.push_back(spec);
return false;
}
#ifdef _WIN32
// Windows dir /B always returns only the filenames
// we must manually prepend any preceeding filepath to return the same spec
// as 'ls -1'
std::string native_dir = radix::dirname(spec);
if (native_dir.compare(".") != 0)
{
for (size_t i = 0; i < paths.size(); ++i)
{
paths[i] = native_dir + "\\" + paths[i];
}
}
#endif
return true;
} // getPaths
......
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