don't report deletions when renamed, assert checksum on client

This commit is contained in:
Damien Elmes 2009-02-04 22:33:49 +09:00
parent 89a31fdc9a
commit d0fa667717
2 changed files with 3 additions and 1 deletions

View file

@ -209,7 +209,7 @@ values (:id, strftime('%s', 'now'))""", id=id)
deck.flushMod()
deck.save()
deck.finishProgress()
return missingFileCount, unusedFileCount
return missingFileCount, unusedFileCount - len(renamedFiles)
def mediaRefs(string):
"Return list of (fullMatch, filename, replacementString)."

View file

@ -1103,6 +1103,8 @@ class BulkMediaSyncerProxy(HttpSyncServerProxy):
return ret
def addFile(self, fname, data):
oldsum = os.path.splitext(fname)[0]
assert oldsum == checksum(data)
return self.runCmd("addFile", fname=fname, data=data)
def runCmd(self, action, **args):