From cebb22731c63602b33e3ad9bc57b82165f806095 Mon Sep 17 00:00:00 2001 From: Roberto Rosario Date: Sat, 25 Feb 2012 23:45:48 -0400 Subject: [PATCH] Calculate a staging file id from the hash of its full filepath and not of the contents Can finally close issue #1 --- apps/sources/staging.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/apps/sources/staging.py b/apps/sources/staging.py index 8f6608ed3e..c6a92a2bcb 100644 --- a/apps/sources/staging.py +++ b/apps/sources/staging.py @@ -102,9 +102,7 @@ class StagingFile(object): self.source = source self.filepath = filepath self.filename = os.path.basename(filepath) - fd = open(filepath, 'rb') - self._id = HASH_FUNCTION(fd.read()) - fd.close() + self._id = HASH_FUNCTION(filepath) def __unicode__(self): return self.filename