mirror of
https://github.com/yhirose/cpp-httplib.git
synced 2025-05-15 09:18:27 +00:00
Fix #315
This commit is contained in:
parent
96e9ec0663
commit
04957c0f08
2 changed files with 17 additions and 11 deletions
|
@ -122,7 +122,10 @@ int main(int argc, const char **argv) {
|
|||
auto base_dir = "./";
|
||||
if (argc > 2) { base_dir = argv[2]; }
|
||||
|
||||
svr.set_base_dir(base_dir);
|
||||
if (!svr.set_base_dir(base_dir)) {
|
||||
cout << "The specified base directory doesn't exist...";
|
||||
return 1;
|
||||
}
|
||||
|
||||
cout << "The server started at port " << port << "...";
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue