diff options
author | chriseth <chris@ethereum.org> | 2017-01-07 00:11:10 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-01-07 00:11:10 +0800 |
commit | a4d7a590ea0a38c3418cca50192e5fcedf38a8fb (patch) | |
tree | 55be823aa5a97e22756ef2498299703cff73698b /libsolidity | |
parent | 0031e6a530a12d98752a1ad85750f25c9890a6ba (diff) | |
parent | 779a01faa9b18a58a133a120d6aebe1df612cb00 (diff) | |
download | dexon-solidity-a4d7a590ea0a38c3418cca50192e5fcedf38a8fb.tar.gz dexon-solidity-a4d7a590ea0a38c3418cca50192e5fcedf38a8fb.tar.zst dexon-solidity-a4d7a590ea0a38c3418cca50192e5fcedf38a8fb.zip |
Merge pull request #1537 from ethereum/absolute-path
absolute path detection is not confused by ".dir"
Diffstat (limited to 'libsolidity')
-rw-r--r-- | libsolidity/interface/CompilerStack.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libsolidity/interface/CompilerStack.cpp b/libsolidity/interface/CompilerStack.cpp index 4095844f..ee55f41a 100644 --- a/libsolidity/interface/CompilerStack.cpp +++ b/libsolidity/interface/CompilerStack.cpp @@ -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) |