Skip to content

Fix file restore from backward diffs - #77

Merged
varmar05 merged 1 commit into
developfrom
fix_restore_file_function
May 23, 2023
Merged

varmar05 merged 1 commit into
developfrom
fix_restore_file_function

Conversation

@varmar05

Copy link
Copy Markdown
Collaborator

This PR address issue with geopackage file reconstruction for some older project version. There is also small test refactoring.

How to reproduce: Try to reconstruct file at version where no change was done going backward.

Issue:
The actual issue was found in file diff change method which evaluates basefile and list of diffs to be applied for successful geopackage reconstruction. When going backward, version of interest does not need to be the one with diff. Previous implementation dropped last diff in list automatically even though it might have been needed. This would result either in no diffs found (hence failed reconstruction) or not all diffs applied (data corruption / loss).

Fix: From history of diffs we only remove diff if it belongs to version of interest (because its application would result in reconstruction of previous version).

@varmar05
varmar05 requested a review from wonder-sk May 23, 2023 07:55
@varmar05
varmar05 merged commit 9d51380 into develop May 23, 2023
@MarcelGeo
MarcelGeo deleted the fix_restore_file_function branch June 5, 2023 09:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants