- if (!FileExists(targetfile))
- {
- _error->Error(_("Download Failed"));
- return false;
- }
- if(hash.empty() == false)
- {
- if(hash.VerifyFile(targetfile) == false)
- {
- _error->Error(_("HashSum Failed"));
- Rename(targetfile, targetfile+".failed");
- return false;
- }
- }
+ bool Failed = false;
+ if (AcquireRun(Fetcher, 0, &Failed, NULL) == false || Failed == true ||
+ FileExists(targetfile) == false)
+ return _error->Error(_("Download Failed"));