mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Handle allowing empty paths correctly
This commit is contained in:
@@ -358,7 +358,7 @@ bool CommandLineParser::parseInputPathsAndRemappings()
|
||||
|
||||
boost::filesystem::path remappingDir = remapping->target;
|
||||
remappingDir.remove_filename();
|
||||
m_options.input.allowedDirectories.insert(remappingDir);
|
||||
m_options.input.allowedDirectories.insert(remappingDir.empty() ? "." : remappingDir);
|
||||
|
||||
m_options.input.remappings.emplace_back(move(remapping.value()));
|
||||
}
|
||||
@@ -979,7 +979,8 @@ bool CommandLineParser::processArgs()
|
||||
{
|
||||
vector<string> paths;
|
||||
for (string const& allowedPath: boost::split(paths, m_args[g_strAllowPaths].as<string>(), boost::is_any_of(",")))
|
||||
m_options.input.allowedDirectories.insert(allowedPath);
|
||||
if (!allowedPath.empty())
|
||||
m_options.input.allowedDirectories.insert(allowedPath);
|
||||
}
|
||||
|
||||
if (m_args.count(g_strStopAfter))
|
||||
|
||||
Reference in New Issue
Block a user