Skip to content

Commit

Permalink
Merge pull request #18 from Legilibre/fix-duplicates
Browse files Browse the repository at this point in the history
Correction de la mise à jour incrémentale
  • Loading branch information
Changaco authored Jul 17, 2017
2 parents d9466a2 + ea79f61 commit 15fd400
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions legi/tar2sqlite.py
Original file line number Diff line number Diff line change
Expand Up @@ -252,14 +252,13 @@ def count_one(k):
'other_cid': text_cid,
'other_dossier': dossier,
'other_mtime': mtime,
})
count_one('insert into duplicate_files')
}, replace=True)
count_one('upsert into duplicate_files')
elif prev_mtime == mtime:
skipped += 1
continue

for block in entry.get_blocks():
xml.feed(block)
xml.feed(b''.join(entry.get_blocks()))
root = xml.close()
tag = root.tag
meta = root.find('META')
Expand Down Expand Up @@ -381,8 +380,8 @@ def count_one(k):
'other_cid': prev_cid,
'other_dossier': prev_dossier,
'other_mtime': prev_mtime,
})
count_one('insert into duplicate_files')
}, replace=True)
count_one('upsert into duplicate_files')
continue

attrs['dossier'] = dossier
Expand Down

0 comments on commit 15fd400

Please sign in to comment.