/* ######################################################################
GZip method - Take a file URI in and decompress it into the target
/* ######################################################################
GZip method - Take a file URI in and decompress it into the target
// GzipMethod::Fetch - Decompress the passed URI /*{{{*/
// ---------------------------------------------------------------------
// GzipMethod::Fetch - Decompress the passed URI /*{{{*/
// ---------------------------------------------------------------------
bool GzipMethod::Fetch(FetchItem *Itm)
{
URI Get = Itm->Uri;
string Path = Get.Host + Get.Path; // To account for relative paths
bool GzipMethod::Fetch(FetchItem *Itm)
{
URI Get = Itm->Uri;
string Path = Get.Host + Get.Path; // To account for relative paths
// Open the source and destination files
FileFd From(Path,FileFd::ReadOnly);
// Open the source and destination files
FileFd From(Path,FileFd::ReadOnly);
- if (ExecWait(Process,_config->Find("Dir::bin::gzip","gzip").c_str(),false) == false)
+ if (ExecWait(Process,_config->Find(GzPathOption,Prog).c_str(),false) == false)
// Transfer the modification times
struct stat Buf;
if (stat(Path.c_str(),&Buf) != 0)
// Transfer the modification times
struct stat Buf;
if (stat(Path.c_str(),&Buf) != 0)
struct utimbuf TimeBuf;
TimeBuf.actime = Buf.st_atime;
TimeBuf.modtime = Buf.st_mtime;
if (utime(Itm->DestFile.c_str(),&TimeBuf) != 0)
struct utimbuf TimeBuf;
TimeBuf.actime = Buf.st_atime;
TimeBuf.modtime = Buf.st_mtime;
if (utime(Itm->DestFile.c_str(),&TimeBuf) != 0)