aboutsummaryrefslogtreecommitdiffstats
path: root/solc/CommandLineInterface.cpp
diff options
context:
space:
mode:
authorchriseth <c@ethdev.com>2017-03-14 18:58:43 +0800
committerchriseth <c@ethdev.com>2017-03-14 18:58:43 +0800
commit14196f2621cbc3a7580ae05b6f7508c92467168a (patch)
tree98701ae328792d01c8b86aeb89a1df035f995c0f /solc/CommandLineInterface.cpp
parent9aab3b8639afa6e30e866e052a412b6f39c6ef6c (diff)
downloaddexon-solidity-14196f2621cbc3a7580ae05b6f7508c92467168a.tar.gz
dexon-solidity-14196f2621cbc3a7580ae05b6f7508c92467168a.tar.zst
dexon-solidity-14196f2621cbc3a7580ae05b6f7508c92467168a.zip
Allow long library names.
Diffstat (limited to 'solc/CommandLineInterface.cpp')
-rw-r--r--solc/CommandLineInterface.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/solc/CommandLineInterface.cpp b/solc/CommandLineInterface.cpp
index 0c777c77..31f70272 100644
--- a/solc/CommandLineInterface.cpp
+++ b/solc/CommandLineInterface.cpp
@@ -420,7 +420,16 @@ void CommandLineInterface::readInputFilesAndConfigureRemappings()
bool CommandLineInterface::parseLibraryOption(string const& _input)
{
namespace fs = boost::filesystem;
- string data = fs::is_regular_file(_input) ? contentsString(_input) : _input;
+ string data = _input;
+ try
+ {
+ if (fs::is_regular_file(_input))
+ data = contentsString(_input);
+ }
+ catch (fs::filesystem_error const&)
+ {
+ // Thrown e.g. if path is too long.
+ }
vector<string> libraries;
boost::split(libraries, data, boost::is_space() || boost::is_any_of(","), boost::token_compress_on);