diff options
author | Alex Beregszaszi <alex@rtfs.hu> | 2017-02-06 03:39:30 +0800 |
---|---|---|
committer | Alex Beregszaszi <alex@rtfs.hu> | 2017-02-06 22:27:54 +0800 |
commit | a5d0fd9c8a21af4a524ae60470c9381e94af446a (patch) | |
tree | 7e50d65e9af042225324a8e7843f8df1e069d07d /solc/CommandLineInterface.cpp | |
parent | 06de89aef074a78320dc44b0b461583a2208f62a (diff) | |
download | dexon-solidity-a5d0fd9c8a21af4a524ae60470c9381e94af446a.tar.gz dexon-solidity-a5d0fd9c8a21af4a524ae60470c9381e94af446a.tar.zst dexon-solidity-a5d0fd9c8a21af4a524ae60470c9381e94af446a.zip |
Do not create directories . and ..
Diffstat (limited to 'solc/CommandLineInterface.cpp')
-rw-r--r-- | solc/CommandLineInterface.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/solc/CommandLineInterface.cpp b/solc/CommandLineInterface.cpp index 26355353..6759727f 100644 --- a/solc/CommandLineInterface.cpp +++ b/solc/CommandLineInterface.cpp @@ -461,7 +461,9 @@ void CommandLineInterface::createFile(string const& _fileName, string const& _da namespace fs = boost::filesystem; // create directory if not existent fs::path p(m_args.at(g_argOutputDir).as<string>()); - fs::create_directories(p); + // Do not try creating the directory if the first item is . or .. + if (p.filename() != "." && p.filename() != "..") + fs::create_directories(p); string pathName = (p / _fileName).string(); ofstream outFile(pathName); outFile << _data; |