From: wessels <> Date: Tue, 4 Sep 2001 05:01:45 +0000 (+0000) Subject: Don't try chdir("none") for coredump_dir option. X-Git-Tag: SQUID_3_0_PRE1~1412 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=0ce9df2728c68f68d21a7bd63dcea466d1966ae3;p=thirdparty%2Fsquid.git Don't try chdir("none") for coredump_dir option. --- diff --git a/src/main.cc b/src/main.cc index dbbe9b4015..c43752e944 100644 --- a/src/main.cc +++ b/src/main.cc @@ -1,6 +1,6 @@ /* - * $Id: main.cc,v 1.340 2001/08/16 00:16:16 hno Exp $ + * $Id: main.cc,v 1.341 2001/09/03 23:01:45 wessels Exp $ * * DEBUG: section 1 Startup and Main Loop * AUTHOR: Harvest Derived @@ -424,7 +424,9 @@ mainSetCwd(void) { char *p; if (Config.coredump_dir) { - if (chdir(Config.coredump_dir) == 0) { + if (0 == strcmp("none", Config.coredump_dir)) { + (void) 0; + } else if (chdir(Config.coredump_dir) == 0) { debug(0, 1) ("Set Current Directory to %s\n", Config.coredump_dir); return; } else {