Skip to content

Commit

Permalink
Merge pull request #3159 from csordasmarton/handle_store_zip_duplicat…
Browse files Browse the repository at this point in the history
…ion_warning

[cmd] Handle duplication warning at store
  • Loading branch information
bruntib authored Jan 28, 2021
2 parents c13a8f6 + aedda3e commit 3212cd1
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion web/client/codechecker_client/cmd/store.py
Original file line number Diff line number Diff line change
Expand Up @@ -648,7 +648,12 @@ def assemble_zip(inputs, zip_file, client):
if h in necessary_hashes or h in file_hash_with_review_status:
LOG.debug("File contents for '%s' needed by the server", f)

zipf.write(f, os.path.join('root', f.lstrip('/')))
file_path = os.path.join('root', f.lstrip('/'))

try:
zipf.getinfo(file_path)
except KeyError:
zipf.write(f, file_path)

zipf.writestr('content_hashes.json', json.dumps(file_to_hash))

Expand Down

0 comments on commit 3212cd1

Please sign in to comment.