|
|
@ -37,6 +37,13 @@ RetVal<std::vector<struct FileInfo>> COPERNICUSData::ReadRemoteFileList(const MS |
|
|
|
bool next = true; |
|
|
|
bool next = true; |
|
|
|
|
|
|
|
|
|
|
|
CURLRAII chandle; |
|
|
|
CURLRAII chandle; |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
auto oldprefix = michlib::GPL.UsePrefix("COPERNICUS"); |
|
|
|
|
|
|
|
auto proxyurl = michlib::GPL.ParameterSValue("Proxy", ""); |
|
|
|
|
|
|
|
if(proxyurl.Exist()) curl_easy_setopt(chandle, CURLOPT_PROXY, proxyurl.Buf()); |
|
|
|
|
|
|
|
michlib::GPL.UsePrefix(oldprefix); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
while(next) |
|
|
|
while(next) |
|
|
|
{ |
|
|
|
{ |
|
|
|
MString url = bucket + "?list-type=2&prefix=" + prefix; |
|
|
|
MString url = bucket + "?list-type=2&prefix=" + prefix; |
|
|
@ -133,6 +140,11 @@ Error COPERNICUSData::Mirror(const CLArgs& args) const |
|
|
|
if(filter.Compile() != 0) return Error(pref, MString("Can't compile regular expression ") + filter.RegStr()); |
|
|
|
if(filter.Compile() != 0) return Error(pref, MString("Can't compile regular expression ") + filter.RegStr()); |
|
|
|
|
|
|
|
|
|
|
|
CURLRAII chandle; |
|
|
|
CURLRAII chandle; |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
auto proxyurl = michlib::GPL.ParameterSValue("Proxy", ""); |
|
|
|
|
|
|
|
if(proxyurl.Exist()) curl_easy_setopt(chandle, CURLOPT_PROXY, proxyurl.Buf()); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
for(const auto& dset: dsets) |
|
|
|
for(const auto& dset: dsets) |
|
|
|
{ |
|
|
|
{ |
|
|
|
michlib::message("Mirroring " + dset); |
|
|
|
michlib::message("Mirroring " + dset); |
|
|
|