diff options
author | Arch Librarian <arch@canonical.com> | 2004-09-20 16:53:18 +0000 |
---|---|---|
committer | Arch Librarian <arch@canonical.com> | 2004-09-20 16:53:18 +0000 |
commit | 6b1ff003a4acd2914dd395b651c485fb352e3d1a (patch) | |
tree | ac0b53eca20edab2d4f5dff7aa22411a2f8f0963 /cmdline | |
parent | a9a5908db9fa6ee108fb23f516b422aa9ca47120 (diff) |
Checked the size of partial files #33705
Author: jgg
Date: 1999-03-27 03:02:38 GMT
Checked the size of partial files #33705
Diffstat (limited to 'cmdline')
-rw-r--r-- | cmdline/apt-get.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/cmdline/apt-get.cc b/cmdline/apt-get.cc index 81c350dfa..73397e8ae 100644 --- a/cmdline/apt-get.cc +++ b/cmdline/apt-get.cc @@ -1,6 +1,6 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: apt-get.cc,v 1.46 1999/03/27 01:30:38 jgg Exp $ +// $Id: apt-get.cc,v 1.47 1999/03/27 03:02:39 jgg Exp $ /* ###################################################################### apt-get - Cover for dpkg @@ -543,6 +543,7 @@ bool InstallPackages(CacheFile &Cache,bool ShwKept,bool Ask = true,bool Saftey = // Display statistics unsigned long FetchBytes = Fetcher.FetchNeeded(); + unsigned long FetchPBytes = Fetcher.PartialPresent(); unsigned long DebBytes = Fetcher.TotalNeeded(); if (DebBytes != Cache->DebSize()) { @@ -556,7 +557,7 @@ bool InstallPackages(CacheFile &Cache,bool ShwKept,bool Ask = true,bool Saftey = if (statfs(OutputDir.c_str(),&Buf) != 0) return _error->Errno("statfs","Couldn't determine free space in %s", OutputDir.c_str()); - if (unsigned(Buf.f_bfree) < FetchBytes/Buf.f_bsize) + if (unsigned(Buf.f_bfree) < (FetchBytes - FetchPBytes)/Buf.f_bsize) return _error->Error("Sorry, you don't have enough free space in %s", OutputDir.c_str()); |