aboutsummaryrefslogtreecommitdiffstats
path: root/CommandLineInterface.cpp
diff options
context:
space:
mode:
authorMarek Kotewicz <marek.kotewicz@gmail.com>2014-12-11 19:08:51 +0800
committerMarek Kotewicz <marek.kotewicz@gmail.com>2014-12-11 19:08:51 +0800
commitce5e6ce67be994acc7c5dbf903dd88759b531be8 (patch)
tree88d70b67c54bd180239c6751702669c0d2b43a6a /CommandLineInterface.cpp
parenta68d58cb9e9eee838c63e3cf8317a70be6852707 (diff)
parent207da9ef0f8c67bc39393652d995b55cbfd0eb97 (diff)
downloaddexon-solidity-ce5e6ce67be994acc7c5dbf903dd88759b531be8.tar
dexon-solidity-ce5e6ce67be994acc7c5dbf903dd88759b531be8.tar.gz
dexon-solidity-ce5e6ce67be994acc7c5dbf903dd88759b531be8.tar.bz2
dexon-solidity-ce5e6ce67be994acc7c5dbf903dd88759b531be8.tar.lz
dexon-solidity-ce5e6ce67be994acc7c5dbf903dd88759b531be8.tar.xz
dexon-solidity-ce5e6ce67be994acc7c5dbf903dd88759b531be8.tar.zst
dexon-solidity-ce5e6ce67be994acc7c5dbf903dd88759b531be8.zip
Merge branch 'macox_fixes' into build_enhancement
Conflicts: test/solidityNatspecJSON.cpp
Diffstat (limited to 'CommandLineInterface.cpp')
-rw-r--r--CommandLineInterface.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/CommandLineInterface.cpp b/CommandLineInterface.cpp
index d3dd3945..6ace332f 100644
--- a/CommandLineInterface.cpp
+++ b/CommandLineInterface.cpp
@@ -255,7 +255,22 @@ bool CommandLineInterface::processInput()
}
else
for (string const& infile: m_args["input-file"].as<vector<string>>())
+ {
+ auto path = boost::filesystem::path(infile);
+ if (!boost::filesystem::exists(path))
+ {
+ cout << "Skipping non existant input file \"" << infile << "\"" << endl;
+ continue;
+ }
+
+ if (!boost::filesystem::is_regular_file(path))
+ {
+ cout << "\"" << infile << "\" is not a valid file. Skipping" << endl;
+ continue;
+ }
+
m_sourceCodes[infile] = asString(dev::contents(infile));
+ }
try
{