aboutsummaryrefslogtreecommitdiffstats
path: root/P3
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--P3/server.c5
1 files changed, 4 insertions, 1 deletions
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