summaryrefslogtreecommitdiff
path: root/pkg_resources.py
diff options
context:
space:
mode:
Diffstat (limited to 'pkg_resources.py')
-rw-r--r--pkg_resources.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/pkg_resources.py b/pkg_resources.py
index b59f1703..2ec645d3 100644
--- a/pkg_resources.py
+++ b/pkg_resources.py
@@ -1459,7 +1459,14 @@ class ZipProvider(EggProvider):
if not os.path.isfile(file_path):
return False
stat = os.stat(file_path)
- return stat.st_size==size and stat.st_mtime==timestamp
+ if stat.st_size!=size or stat.st_mtime!=timestamp:
+ return False
+ # check that the contents match
+ zip_contents = self.loader.get_data(zip_path)
+ f = open(file_path, 'rb')
+ file_contents = f.read()
+ f.close()
+ return zip_contents == file_contents
def _get_eager_resources(self):
if self.eagers is None: