From 30a95ef9d6dafe7577119bdd650aa6a720bd3fc2 Mon Sep 17 00:00:00 2001 From: Joachim Klein Date: Fri, 8 Jun 2018 11:28:38 +0200 Subject: [PATCH] Simplify check whether argument of --prop is a file/property Before, the argument to `--prop` was only treated as a file if (a) it exits and (b) contains a dot. We remove the requirement for a dot and always treat the argument as a file if it exists. --- src/storm/api/properties.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/storm/api/properties.cpp b/src/storm/api/properties.cpp index f6a2d00e3..5b5d53bcb 100644 --- a/src/storm/api/properties.cpp +++ b/src/storm/api/properties.cpp @@ -24,10 +24,9 @@ namespace storm { } std::vector parseProperties(storm::parser::FormulaParser& formulaParser, std::string const& inputString, boost::optional> const& propertyFilter) { - // If the given property looks like a file (containing a dot and there exists a file with that name), - // we try to parse it as a file, otherwise we assume it's a property. + // If the given property is a file, we parse it as a file, otherwise we assume it's a property. std::vector properties; - if (inputString.find(".") != std::string::npos && std::ifstream(inputString).good()) { + if (std::ifstream(inputString).good()) { properties = formulaParser.parseFromFile(inputString); } else { properties = formulaParser.parseFromString(inputString);