diff options
Diffstat (limited to 'Source/Library/Userland/App')
-rw-r--r-- | Source/Library/Userland/App/StreamApp.proto.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Source/Library/Userland/App/StreamApp.proto.cpp b/Source/Library/Userland/App/StreamApp.proto.cpp index b1dc7dd..90b8221 100644 --- a/Source/Library/Userland/App/StreamApp.proto.cpp +++ b/Source/Library/Userland/App/StreamApp.proto.cpp @@ -33,6 +33,14 @@ void StreamApp::init() { } else { FileIStream *f = new FileIStream(encoding, FS::cwdNode()); for (u32int i = 0; i < args.size(); i++) { + FSNode n = FS::find(args[i], FS::cwdNode()); + if (!n.valid()) { + outvt << "File does not exist : " << args[i] << ENDL; + exit(-1); + } else if (n.type() != NT_FILE) { + outvt << "Not a file : " << args[i] << ENDL; + exit(-1); + } f->appendFile(args[i]); } in = f; |