r = deflate(tar_data->zp, flush ? Z_FINISH : Z_NO_FLUSH);
if (r == Z_STREAM_ERROR)
{
- tar_data->base.lasterrstring = "could not compress data";
+ tar_data->base.lasterrstring = _("could not compress data");
return false;
}
/* Reset the stream for writing */
if (deflateReset(tar_data->zp) != Z_OK)
{
- tar_data->base.lasterrstring = "could not reset compression stream";
+ tar_data->base.lasterrstring = _("could not reset compression stream");
return false;
}
}
pg_free(tar_data->zp);
tar_data->zp = NULL;
wwmethod->lasterrstring =
- "could not initialize compression library";
+ _("could not initialize compression library");
return NULL;
}
}
if (tar_data->currentfile != NULL)
{
wwmethod->lasterrstring =
- "implementation error: tar files can't have more than one open file";
+ _("implementation error: tar files can't have more than one open file");
return NULL;
}
pg_free(tar_data->currentfile);
pg_free(tmppath);
tar_data->currentfile = NULL;
- wwmethod->lasterrstring = "could not create tar header";
+ wwmethod->lasterrstring = _("could not create tar header");
return NULL;
}
if (deflateParams(tar_data->zp, 0, Z_DEFAULT_STRATEGY) != Z_OK)
{
wwmethod->lasterrstring =
- "could not change compression parameters";
+ _("could not change compression parameters");
return NULL;
}
}
if (deflateParams(tar_data->zp, wwmethod->compression_level,
Z_DEFAULT_STRATEGY) != Z_OK)
{
- wwmethod->lasterrstring = "could not change compression parameters";
+ wwmethod->lasterrstring = _("could not change compression parameters");
return NULL;
}
}
{
if (f->wwmethod->compression_algorithm != PG_COMPRESSION_NONE)
{
- f->wwmethod->lasterrstring = "unlink not supported with compression";
+ f->wwmethod->lasterrstring = _("unlink not supported with compression");
return -1;
}
/* Turn off compression */
if (deflateParams(tar_data->zp, 0, Z_DEFAULT_STRATEGY) != Z_OK)
{
- f->wwmethod->lasterrstring = "could not change compression parameters";
+ f->wwmethod->lasterrstring = _("could not change compression parameters");
return -1;
}
if (deflateParams(tar_data->zp, f->wwmethod->compression_level,
Z_DEFAULT_STRATEGY) != Z_OK)
{
- f->wwmethod->lasterrstring = "could not change compression parameters";
+ f->wwmethod->lasterrstring = _("could not change compression parameters");
return -1;
}
}
if (r == Z_STREAM_ERROR)
{
- wwmethod->lasterrstring = "could not compress data";
+ wwmethod->lasterrstring = _("could not compress data");
return false;
}
if (tar_data->zp->avail_out < ZLIB_OUT_SIZE)
if (deflateEnd(tar_data->zp) != Z_OK)
{
- wwmethod->lasterrstring = "could not close compression stream";
+ wwmethod->lasterrstring = _("could not close compression stream");
return false;
}
}