Merge pull request #1537 from ethereum/absolute-path

absolute path detection is not confused by ".dir"
This commit is contained in:
chriseth
2017-01-06 17:11:10 +01:00
committed by GitHub
4 changed files with 15 additions and 5 deletions
+3 -3
View File
@@ -593,11 +593,11 @@ bool CompilerStack::checkLibraryNameClashes()
string CompilerStack::absolutePath(string const& _path, string const& _reference) const
{
// Anything that does not start with `.` is an absolute path.
if (_path.empty() || _path.front() != '.')
return _path;
using path = boost::filesystem::path;
path p(_path);
// Anything that does not start with `.` is an absolute path.
if (p.begin() == p.end() || (*p.begin() != "." && *p.begin() != ".."))
return _path;
path result(_reference);
result.remove_filename();
for (path::iterator it = p.begin(); it != p.end(); ++it)