--- configfile.cc.DIST 2005-08-15 18:22:51.000000000 -0700 +++ configfile.cc 2005-10-18 23:04:23.613664000 -0700 @@ -201,7 +201,11 @@ copied.insert(inc, numstr); - if (stat(copied.c_str(), &filstat) == -1) { + // Also check for gzip files + string copiedgz = copied + ".gz"; + struct stat filstatgz; + + if (stat(copied.c_str(), &filstat) == -1 && stat(copiedgz.c_str(), &filstatgz) == -1) { found = 1; logtemplate = copied; break; @@ -216,7 +220,11 @@ copied.insert(inc, numstr); - if (stat(copied.c_str(), &filstat) != -1 && overwrite == 0) { + // Also check for gzip files + string copiedgz = copied + ".gz"; + struct stat filstatgz; + + if ((stat(copied.c_str(), &filstat) != -1 || stat(copiedgz.c_str(), &filstatgz) != -1 ) && overwrite == 0) { logtemplate = ""; } else { logtemplate = copied;