diff options
author | Michael Vogt <mvo@debian.org> | 2015-08-18 11:57:35 +0200 |
---|---|---|
committer | Michael Vogt <mvo@debian.org> | 2015-08-18 11:57:35 +0200 |
commit | b53c9cea2902572822bbbece5bac236c1bbf846e (patch) | |
tree | 6c6b0524e0971c0623ccbff71383523ee0b2a5cc /methods/copy.cc | |
parent | 21248c0f00ee71412dbadc6ebf84011cf974346d (diff) | |
parent | 2a22cd60f04c4291ea9b9b72e15b6d2ec378b001 (diff) |
Merge remote-tracking branch 'upstream/debian/experimental' into feature/srv-records
Diffstat (limited to 'methods/copy.cc')
-rw-r--r-- | methods/copy.cc | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/methods/copy.cc b/methods/copy.cc index a8e289df5..0c9f322e6 100644 --- a/methods/copy.cc +++ b/methods/copy.cc @@ -27,7 +27,7 @@ class CopyMethod : public pkgAcqMethod { - virtual bool Fetch(FetchItem *Itm); + virtual bool Fetch(FetchItem *Itm) APT_OVERRIDE; void CalculateHashes(FetchItem const * const Itm, FetchResult &Res); public: @@ -38,11 +38,7 @@ class CopyMethod : public pkgAcqMethod void CopyMethod::CalculateHashes(FetchItem const * const Itm, FetchResult &Res) { Hashes Hash(Itm->ExpectedHashes); - FileFd::CompressMode CompressMode = FileFd::None; - if (_config->FindB("Acquire::GzipIndexes", false) == true) - CompressMode = FileFd::Extension; - - FileFd Fd(Res.Filename, FileFd::ReadOnly, CompressMode); + FileFd Fd(Res.Filename, FileFd::ReadOnly, FileFd::Extension); Hash.AddFD(Fd); Res.TakeHashes(Hash); } @@ -53,7 +49,7 @@ void CopyMethod::CalculateHashes(FetchItem const * const Itm, FetchResult &Res) bool CopyMethod::Fetch(FetchItem *Itm) { // this ensures that relative paths work in copy - std::string File = Itm->Uri.substr(Itm->Uri.find(':')+1); + std::string const File = Itm->Uri.substr(Itm->Uri.find(':')+1); // Stat the file and send a start message struct stat Buf; |