summaryrefslogtreecommitdiff
path: root/anymux.cpp
diff options
context:
space:
mode:
authorErwin Nindl <nine@wirdorange.org>2008-02-28 21:22:31 +0000
committerErwin Nindl <nine@wirdorange.org>2008-02-28 21:22:31 +0000
commit4ecaec75194f2dbd5512385e974083a5e80d4eef (patch)
treeea9b46b8b2100134975f7883507976cea1ba5466 /anymux.cpp
parentadded anymuxoptions files (diff)
added filepath check to anymux
Diffstat (limited to 'anymux.cpp')
-rw-r--r--anymux.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/anymux.cpp b/anymux.cpp
index 8f0bc55..ff5db52 100644
--- a/anymux.cpp
+++ b/anymux.cpp
@@ -29,6 +29,7 @@
*/
#include <iostream>
+#include <fstream>
#include <poll.h>
#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();