From 14196f2621cbc3a7580ae05b6f7508c92467168a Mon Sep 17 00:00:00 2001 From: chriseth Date: Tue, 14 Mar 2017 11:58:43 +0100 Subject: Allow long library names. --- solc/CommandLineInterface.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'solc/CommandLineInterface.cpp') 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 libraries; boost::split(libraries, data, boost::is_space() || boost::is_any_of(","), boost::token_compress_on); -- cgit