From 82c5bcf061b523ae30d7153a46d70b06faf451f8 Mon Sep 17 00:00:00 2001 From: Matt Strapp Date: Sun, 15 Nov 2020 12:44:33 -0600 Subject: Add more, probably --- P3/server.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/P3/server.c b/P3/server.c index a42c578..3a2a537 100644 --- a/P3/server.c +++ b/P3/server.c @@ -171,7 +171,10 @@ int main(int argc, char **argv) { // Open log file FILE* logfile = fopen("serverlog.txt", "a+"); // Change the current working directory to server root directory - chdir("testing/"); + if (chdir("testing") == -1) { + perror("Could not find root webserver directory testing. Exiting\n"); + return -1; + } // Initialize cache (extra credit B) // Start the server -- cgit v1.2.3