mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Do not use remove_trailing_separator from Boost 1.58 as 1.56 is required
This commit is contained in:
parent
71a819654e
commit
a458100175
@ -716,8 +716,17 @@ bool CommandLineInterface::processInput()
|
|||||||
if (m_args.count(g_argAllowPaths))
|
if (m_args.count(g_argAllowPaths))
|
||||||
{
|
{
|
||||||
vector<string> paths;
|
vector<string> paths;
|
||||||
for (string const& path: boost::split(paths, m_args[g_argAllowPaths].as<string>(), boost::is_any_of(",")))
|
for (string const& path: boost::split(paths, m_args[g_argAllowPaths].as<string>(), boost::is_any_of(","))) {
|
||||||
m_allowedDirectories.push_back(boost::filesystem::path(path).remove_trailing_separator());
|
auto filesystem_path = boost::filesystem::path(path);
|
||||||
|
// If the given path had a trailing slash, the Boost filesystem
|
||||||
|
// path will have it's last component set to '.'. This breaks
|
||||||
|
// path comparison in later parts of the code, so we need to strip
|
||||||
|
// it.
|
||||||
|
if (filesystem_path.filename() == ".") {
|
||||||
|
filesystem_path.remove_filename();
|
||||||
|
}
|
||||||
|
m_allowedDirectories.push_back(filesystem_path);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (m_args.count(g_argStandardJSON))
|
if (m_args.count(g_argStandardJSON))
|
||||||
|
Loading…
Reference in New Issue
Block a user