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

fix(sync-files): keep original source file intact #297

Merged
merged 1 commit into from
Jun 10, 2024

Conversation

xmfcx
Copy link
Contributor

@xmfcx xmfcx commented Jun 10, 2024

Description

Instead of modifying the source file in place, first copy it to a temp location with mktemp, then do all the modifications and copy to dest path as usual.

Currently it modifies the source files in place.

If multiple versions are to be created from the same source file, it will modify them multiple times, breaking files.

Tests performed

Tested with the temporary v-test-sync-files tag. By calling it from:

Without this PR

image

With this PR

image

Effects on system behavior

Not applicable.

Interface changes

Pre-review checklist for the PR author

The PR author must check the checkboxes below when creating the PR.

In-review checklist for the PR reviewers

The PR reviewers must check the checkboxes below before approval.

Post-review checklist for the PR author

The PR author must check the checkboxes below before merging.

  • There are no open discussions or they are tracked via tickets.

After all checkboxes are checked, anyone who has write access can merge the PR.

Signed-off-by: M. Fatih Cırıt <mfc@leodrive.ai>
@xmfcx xmfcx self-assigned this Jun 10, 2024
@xmfcx xmfcx requested a review from mitsudome-r June 10, 2024 06:33
@xmfcx xmfcx marked this pull request as ready for review June 10, 2024 06:36
@xmfcx xmfcx merged commit a6f96e7 into main Jun 10, 2024
17 of 18 checks passed
@xmfcx xmfcx deleted the fix/sync-files-keep-original branch June 10, 2024 08:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants