diff options
author | Yoichi Hirai <i@yoichihirai.com> | 2017-01-02 23:47:45 +0800 |
---|---|---|
committer | Yoichi Hirai <i@yoichihirai.com> | 2017-01-04 01:18:22 +0800 |
commit | 41fe412389645fd423c8fb2422db99892f829030 (patch) | |
tree | d4330c80a58822c5f222b5e32b7f5c55c2ba2b20 /libsolidity/interface/CompilerStack.cpp | |
parent | 9128e73b03856c72e90c581cb36e931e971af29e (diff) | |
download | dexon-solidity-41fe412389645fd423c8fb2422db99892f829030.tar.gz dexon-solidity-41fe412389645fd423c8fb2422db99892f829030.tar.zst dexon-solidity-41fe412389645fd423c8fb2422db99892f829030.zip |
interface: change absolutePath() so that ".dir" is considered as an absolute path
fixes #1534
Diffstat (limited to 'libsolidity/interface/CompilerStack.cpp')
-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) |