mirror of
https://github.com/LizardByte/Sunshine.git
synced 2025-02-21 18:39:59 +00:00
Check for existence of configuration file
This commit is contained in:
parent
13d9f51c67
commit
4eda9e6412
@ -3,6 +3,8 @@
|
||||
//
|
||||
|
||||
#include <thread>
|
||||
#include <filesystem>
|
||||
#include <iostream>
|
||||
|
||||
#include "nvhttp.h"
|
||||
#include "stream.h"
|
||||
@ -16,6 +18,11 @@ extern "C" {
|
||||
using namespace std::literals;
|
||||
int main(int argc, char *argv[]) {
|
||||
if(argc > 1) {
|
||||
if(!std::filesystem::exists(argv[1])) {
|
||||
std::cout << "Error: Couln't find configuration file ["sv << argv[1] << ']' << std::endl;
|
||||
return 7;
|
||||
}
|
||||
|
||||
config::parse_file(argv[1]);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user