From: Michael Schroeder Date: Mon, 3 Mar 2008 20:57:12 +0000 (+0000) Subject: - support not-seekable files again X-Git-Tag: BASE-SuSE-Code-12_1-Branch~308^2~539 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d938cd38d6414b971d0de51dbe8a5706378f4620;p=thirdparty%2Flibsolv.git - support not-seekable files again --- diff --git a/src/repodata.c b/src/repodata.c index 333d6bb1..90742be8 100644 --- a/src/repodata.c +++ b/src/repodata.c @@ -115,6 +115,9 @@ load_page_range(Repodata *data, unsigned int pstart, unsigned int pend) if (i > pend) return data->blob_store + data->pages[pstart].mapped_at; + if (data->pagefd == -1) + return 0; + /* Ensure that we can map the numbers of pages we need at all. */ if (pend - pstart + 1 > data->ncanmap) { @@ -266,8 +269,6 @@ make_vertical_available(Repodata *data, Repokey *key, Id off, Id len) return 0; return data->vincore + off; } - if (data->pagefd == -1) - return 0; if (off + len > key->size) return 0; /* we now have the offset, go into vertical */