mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Better error message when base path does not exist
This commit is contained in:
parent
e3184c737a
commit
056d780b63
@ -383,12 +383,21 @@ bool CommandLineInterface::readInputFiles()
|
|||||||
|
|
||||||
m_fileReader.setBasePath(m_options.input.basePath);
|
m_fileReader.setBasePath(m_options.input.basePath);
|
||||||
|
|
||||||
if (m_fileReader.basePath() != "" && !boost::filesystem::is_directory(m_fileReader.basePath()))
|
if (m_fileReader.basePath() != "")
|
||||||
{
|
{
|
||||||
serr() << "Base path must be a directory: " << m_fileReader.basePath() << endl;
|
if (!boost::filesystem::exists(m_fileReader.basePath()))
|
||||||
|
{
|
||||||
|
serr() << "Base path does not exist: " << m_fileReader.basePath() << endl;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!boost::filesystem::is_directory(m_fileReader.basePath()))
|
||||||
|
{
|
||||||
|
serr() << "Base path is not a directory: " << m_fileReader.basePath() << endl;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
for (boost::filesystem::path const& allowedDirectory: m_options.input.allowedDirectories)
|
for (boost::filesystem::path const& allowedDirectory: m_options.input.allowedDirectories)
|
||||||
m_fileReader.allowDirectory(allowedDirectory);
|
m_fileReader.allowDirectory(allowedDirectory);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user