From 3537de30f2880832546a41dfbba9fc53ea7a74f4 Mon Sep 17 00:00:00 2001 From: Faik Uygur Date: Thu, 16 Jul 2009 12:37:55 +0000 Subject: [PATCH] Take into account downloaded partial files as cached files. --- pisi/operations/helper.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pisi/operations/helper.py b/pisi/operations/helper.py index e12b8cfc..e07e05db 100644 --- a/pisi/operations/helper.py +++ b/pisi/operations/helper.py @@ -105,6 +105,8 @@ def calculate_download_sizes(order): # check the file and sha1sum to be sure it _is_ the cached package if os.path.exists(path) and util.sha1_file(path) == pkg_hash: cached_size += pkg_size + elif os.path.exists("%s.part" % path): + cached_size += os.stat("%s.part" % path).st_size total_size += pkg_size