diff options
author | Sergiusz Bazanski <q3k@q3k.org> | 2017-10-05 18:53:32 +0800 |
---|---|---|
committer | Alex Beregszaszi <alex@rtfs.hu> | 2017-10-06 20:55:18 +0800 |
commit | a458100175fa2b6d265ec939ae12b95ee89acb13 (patch) | |
tree | fdf477b7405dec9d83a620834d861da906a37012 | |
parent | 71a819654e3c46aee92b831b835887ea200944f0 (diff) | |
download | dexon-solidity-a458100175fa2b6d265ec939ae12b95ee89acb13.tar dexon-solidity-a458100175fa2b6d265ec939ae12b95ee89acb13.tar.gz dexon-solidity-a458100175fa2b6d265ec939ae12b95ee89acb13.tar.bz2 dexon-solidity-a458100175fa2b6d265ec939ae12b95ee89acb13.tar.lz dexon-solidity-a458100175fa2b6d265ec939ae12b95ee89acb13.tar.xz dexon-solidity-a458100175fa2b6d265ec939ae12b95ee89acb13.tar.zst dexon-solidity-a458100175fa2b6d265ec939ae12b95ee89acb13.zip |
Do not use remove_trailing_separator from Boost 1.58 as 1.56 is required
-rw-r--r-- | solc/CommandLineInterface.cpp | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/solc/CommandLineInterface.cpp b/solc/CommandLineInterface.cpp index 36fcc1a4..1686dc2e 100644 --- a/solc/CommandLineInterface.cpp +++ b/solc/CommandLineInterface.cpp @@ -716,8 +716,17 @@ bool CommandLineInterface::processInput() if (m_args.count(g_argAllowPaths)) { vector<string> paths; - for (string const& path: boost::split(paths, m_args[g_argAllowPaths].as<string>(), boost::is_any_of(","))) - m_allowedDirectories.push_back(boost::filesystem::path(path).remove_trailing_separator()); + for (string const& path: boost::split(paths, m_args[g_argAllowPaths].as<string>(), boost::is_any_of(","))) { + auto filesystem_path = boost::filesystem::path(path); + // If the given path had a trailing slash, the Boost filesystem + // path will have it's last component set to '.'. This breaks + // path comparison in later parts of the code, so we need to strip + // it. + if (filesystem_path.filename() == ".") { + filesystem_path.remove_filename(); + } + m_allowedDirectories.push_back(filesystem_path); + } } if (m_args.count(g_argStandardJSON)) |