27 if ( !mediaHandle.
localPath().has_value() ) {
32 const auto &repoInfo = std::forward<repo::DownloadContextRef>(ctx)->repoInfo();
40 return statusLogic( std::move(dl), std::move(mediaHandle) );
44 auto dlLogic( repo::DownloadContextRef &&ctx,
ProvideMediaHandle mediaHandle, ProgressObserverRef progressObserver ) {
49 if ( !mediaHandle.
localPath().has_value() ) {
53 if ( progressObserver ) progressObserver->inc();
56 const auto &repoInfo = std::forward<repo::DownloadContextRef>(ctx)->repoInfo();
59 zypp::Pathname productpath( std::forward<repo::DownloadContextRef>(ctx)->destDir() / repoInfo.path() );
61 newstatus.saveToCookieFile( productpath/
"cookie" );
63 if ( progressObserver ) progressObserver->setFinished();
65 }
catch (
const zypp::Exception &e ) {
71 return makeReadyTask<Ret>( Ret::success( std::forward<repo::DownloadContextRef>(ctx) ) );
75 MaybeAwaitable<expected<repo::DownloadContextRef> >
download(repo::DownloadContextRef dl,
ProvideMediaHandle mediaHandle, ProgressObserverRef progressObserver)
77 return dlLogic( std::move(dl), std::move(mediaHandle), std::move(progressObserver) );
Track changing files or directories.