diff --git a/chimera/head.c b/chimera/head.c index f75fb45..70fc413 100644 --- a/chimera/head.c +++ b/chimera/head.c @@ -735,7 +735,7 @@ ChimeraRequest *lastresort; if (getcwd( base_url + 5, sizeof(base_url) - 5 ) == NULL) { perror("getcwd failed"); // Try using just the root of filesystem if we could not get cwd - strcat( base_url, "/" ) ; + strcpy( base_url + 5, "/" ) ; } strcat( base_url, "/" ) ; diff --git a/chimera/main.c b/chimera/main.c index d22f0c2..1ec1d13 100644 --- a/chimera/main.c +++ b/chimera/main.c @@ -79,7 +79,8 @@ char **argv; strcpy( base_url, "file:" ) ; if (getcwd( base_url + 5, sizeof(base_url) - 5 ) == NULL) { perror("getcwd failed"); - return 1; + // Try using just the root of filesystem if we could not get cwd + strcpy( base_url + 5, "/"); } strcat( base_url, "/" ) ;