Calculate a staging file id from the hash of its full filepath and not of the contents

Can finally close issue #1
This commit is contained in:
Roberto Rosario
2012-02-25 23:45:48 -04:00
parent 71dfb5f46a
commit cebb22731c

View File

@@ -102,9 +102,7 @@ class StagingFile(object):
self.source = source self.source = source
self.filepath = filepath self.filepath = filepath
self.filename = os.path.basename(filepath) self.filename = os.path.basename(filepath)
fd = open(filepath, 'rb') self._id = HASH_FUNCTION(filepath)
self._id = HASH_FUNCTION(fd.read())
fd.close()
def __unicode__(self): def __unicode__(self):
return self.filename return self.filename