From 2a5950df692f8a2c9d51a2a3e0c4d41fe0d3e7c9 Mon Sep 17 00:00:00 2001 From: Michael Krelin Date: Wed, 13 Feb 2013 22:43:26 +0000 Subject: stream mime attachments directly to disk Signed-off-by: Michael Krelin --- (limited to 'src/eyetil.cc') diff --git a/src/eyetil.cc b/src/eyetil.cc index fba8724..5bceec7 100644 --- a/src/eyetil.cc +++ b/src/eyetil.cc @@ -152,13 +152,13 @@ std::string tmpdir_t::get_file(const std::string& f) { ); } -tarchive_t::tarchive_t(void *p,size_t s) : a(archive_read_new()), e(0) { +tarchive_t::tarchive_t(const char *fn) : a(archive_read_new()), e(0) { if(!a) throw std::runtime_error("failed to archive_read_new()"); if(archive_read_support_format_tar(a)) { archive_read_finish(a); throw std::runtime_error("failed to archive_read_support_format_tar()"); } - if(archive_read_open_memory(a,p,s)) { + if(archive_read_open_filename(a,fn,16384)) { archive_read_finish(a); throw std::runtime_error("failed to archive_read_open_memory()"); } -- cgit v0.9.0.2