Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[cmd] Handle duplication warning at store #3159

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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