From 4ecaec75194f2dbd5512385e974083a5e80d4eef Mon Sep 17 00:00:00 2001 From: Erwin Nindl Date: Thu, 28 Feb 2008 21:22:31 +0000 Subject: added filepath check to anymux --- anymux.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/anymux.cpp b/anymux.cpp index 8f0bc55..ff5db52 100644 --- a/anymux.cpp +++ b/anymux.cpp @@ -29,6 +29,7 @@ */ #include +#include #include #include "datatypes.h" @@ -73,6 +74,15 @@ int main(int argc, char* argv[]) gOpt.printUsage(); exit(-1); } + + std::ifstream file( gOpt.getFileName().c_str() ); + if( file.is_open() ) + file.close(); + else + { + std::cout << "ERROR: unable to open file!" << std::endl; + exit(-1); + } SignalController sig; sig.init(); -- cgit v1.2.3