|
|
|
@ -201,6 +201,7 @@ MString COPERNICUSData::Mirror(const CLArgs& args)
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
CURLRAII dhandle; |
|
|
|
|
for(const auto& dset: dsets) |
|
|
|
|
{ |
|
|
|
|
michlib::message("Mirroring " + dset); |
|
|
|
@ -258,7 +259,7 @@ MString COPERNICUSData::Mirror(const CLArgs& args)
|
|
|
|
|
for(size_t i = 0; i < down.size(); i++) |
|
|
|
|
{ |
|
|
|
|
size_t ri = down[i]; |
|
|
|
|
auto err = DownloadFile(chandle, rfiles[ri], locroot); |
|
|
|
|
auto err = DownloadFile(dhandle, rfiles[ri], locroot); |
|
|
|
|
if(err.Exist()) return err; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -273,7 +274,7 @@ MString COPERNICUSData::Mirror(const CLArgs& args)
|
|
|
|
|
{ |
|
|
|
|
size_t ri = upd[i].first; |
|
|
|
|
size_t li = upd[i].second; |
|
|
|
|
auto err = UpdateFile(chandle, rfiles[ri], lfiles[li], locroot); |
|
|
|
|
auto err = UpdateFile(dhandle, rfiles[ri], lfiles[li], locroot); |
|
|
|
|
if(err.Exist()) return err; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|