summaryrefslogtreecommitdiff
path: root/methods/copy.cc
diff options
context:
space:
mode:
authorMichael Vogt <mvo@ubuntu.com>2014-09-29 08:33:33 +0200
committerMichael Vogt <mvo@ubuntu.com>2014-09-29 08:33:33 +0200
commit48f3f1b24b48066cfc23342a5c6470ddf5e0fa6a (patch)
tree60fdc3dc5d238257bc85ea560cc63a697118ace3 /methods/copy.cc
parentffbe056dc554b3f1fdf79b4726415a70f6d59dc1 (diff)
parente359fe101e1a66277b340563c96e868451d9d4b5 (diff)
Merge branch 'debian/sid' into debian/experimental
Conflicts: apt-pkg/acquire-item.cc
Diffstat (limited to 'methods/copy.cc')
-rw-r--r--methods/copy.cc11
1 files changed, 4 insertions, 7 deletions
diff --git a/methods/copy.cc b/methods/copy.cc
index b65bc4dd5..f542a27c0 100644
--- a/methods/copy.cc
+++ b/methods/copy.cc
@@ -37,15 +37,12 @@ class CopyMethod : public pkgAcqMethod
void CopyMethod::CalculateHashes(FetchResult &Res)
{
- // For gzip indexes we need to look inside the gzip for the hash
- // We can not use the extension here as its not used in partial
- // on a IMS hit
- FileFd::OpenMode OpenMode = FileFd::ReadOnly;
+ Hashes Hash;
+ FileFd::CompressMode CompressMode = FileFd::None;
if (_config->FindB("Acquire::GzipIndexes", false) == true)
- OpenMode = FileFd::ReadOnlyGzip;
+ CompressMode = FileFd::Extension;
- Hashes Hash;
- FileFd Fd(Res.Filename, OpenMode);
+ FileFd Fd(Res.Filename, FileFd::ReadOnly, CompressMode);
Hash.AddFD(Fd);
Res.TakeHashes(Hash);
}