Commit 943ee4df authored by LEFEBVREJP email's avatar LEFEBVREJP email
Browse files

Updating get_paths() on windows to prefix any relative or absolute path to the...

Updating get_paths() on windows to prefix any relative or absolute path to the return files based on the requested spec.
parent 1ef4f9ff
Pipeline #67086 passed with stages
in 24 minutes and 53 seconds
......@@ -275,6 +275,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