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:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user