This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <boost/function.hpp>
#include <boost/optional.hpp>
#include <boost/filesystem.hpp>
#include <boost/function.hpp>
#include <boost/optional.hpp>
#include <boost/filesystem.hpp>
static size_t
get_from_zip_url_data (void* buffer, size_t size, size_t nmemb, void* stream)
static size_t
get_from_zip_url_data (void* buffer, size_t size, size_t nmemb, void* stream)
FILE* f = temp_zip.open ("wb");
curl_easy_setopt (curl, CURLOPT_WRITEFUNCTION, get_from_zip_url_data);
curl_easy_setopt (curl, CURLOPT_WRITEDATA, f);
FILE* f = temp_zip.open ("wb");
curl_easy_setopt (curl, CURLOPT_WRITEFUNCTION, get_from_zip_url_data);
curl_easy_setopt (curl, CURLOPT_WRITEDATA, f);
+ curl_easy_setopt (curl, CURLOPT_FTP_USE_EPSV, 0);
+ /* Maximum time is 20s */
+ curl_easy_setopt (curl, CURLOPT_TIMEOUT, 20);
int const N = zip_fread (zip_file, buffer, sizeof (buffer));
fwrite (buffer, 1, N, f);
if (N < int (sizeof (buffer))) {
int const N = zip_fread (zip_file, buffer, sizeof (buffer));
fwrite (buffer, 1, N, f);
if (N < int (sizeof (buffer))) {
if (line.length() > 55) {
string const file = line.substr (55);
if (file != "." && file != "..") {
if (line.length() > 55) {
string const file = line.substr (55);
if (file != "." && file != "..") {