From ae57c6760b949bd8c4f0b58dc2bb571b209030fc Mon Sep 17 00:00:00 2001 From: Viliam Lejcik Date: Tue, 4 Feb 2020 09:50:17 +0100 Subject: [PATCH] sdbus-c++-xml2cpp: fixed file existence condition fixes issue: https://github.com/Kistler-Group/sdbus-cpp/issues/83 --- tools/xml2cpp-codegen/xml2cpp.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/xml2cpp-codegen/xml2cpp.cpp b/tools/xml2cpp-codegen/xml2cpp.cpp index 5b6c7fe..6bb8796 100644 --- a/tools/xml2cpp-codegen/xml2cpp.cpp +++ b/tools/xml2cpp-codegen/xml2cpp.cpp @@ -149,7 +149,7 @@ int main(int argc, char **argv) std::ifstream input(xmlFile); - if (input.bad()) + if (input.fail()) { std::cerr << "Unable to open file " << xmlFile << endl; return 1;