aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2007-08-08 18:14:43 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2007-08-08 18:14:43 +0000
commite06522f4c7837d67a9c5ff1d06596a2cb6042c67 (patch)
tree115affcdb5aecec76b9095a0b22c89c0d2d73b2f
parent28b5f288d4a7cef0f0022789d4a9141997474807 (diff)
downloadpaludis-e06522f4c7837d67a9c5ff1d06596a2cb6042c67.tar.gz
paludis-e06522f4c7837d67a9c5ff1d06596a2cb6042c67.tar.xz
Code style
-rw-r--r--paludis/repositories/e/check_fetched_files_visitor.cc14
1 files changed, 11 insertions, 3 deletions
diff --git a/paludis/repositories/e/check_fetched_files_visitor.cc b/paludis/repositories/e/check_fetched_files_visitor.cc
index 055cfa4..e623971 100644
--- a/paludis/repositories/e/check_fetched_files_visitor.cc
+++ b/paludis/repositories/e/check_fetched_files_visitor.cc
@@ -191,8 +191,16 @@ CheckFetchedFilesVisitor::check_distfile_manifest(const FSEntry & distfile)
std::ifstream file_stream(stringify(distfile).c_str());
if (! file_stream)
- throw InternalError("Couldn't read distfile: '"+stringify(distfile)
- +"'");
+ {
+ std::cout << "unreadable file";
+ _imp->failures->push_back(FetchActionFailure::create()
+ .target_file(stringify(distfile.basename()))
+ .requires_manual_fetching(false)
+ .failed_integrity_checks("Unreadable file")
+ .failed_automatic_fetching(false)
+ );
+ return false;
+ }
if (! m->rmd160.empty())
{
@@ -233,7 +241,7 @@ CheckFetchedFilesVisitor::check_distfile_manifest(const FSEntry & distfile)
file_stream.clear();
file_stream.seekg(0, std::ios::beg);
}
-
+
if (! m->md5.empty())
{
MD5 md5sum(file_stream);