Allow long library names.

This commit is contained in:
chriseth
2017-03-14 11:58:43 +01:00
parent 9aab3b8639
commit 14196f2621
3 changed files with 14 additions and 1 deletions
+10 -1
View File
@@ -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);