Repository navigation
Journal: a postcard saves the text an export gives back, and a blank tag no longer blocks backups - #37
Merged
Conversation
…eports photo errors
The composer stored title, text, folder, tags and captions as typed, while the
portable-file schema sanitizes them on export and import. A control character,
a bidi override or a leading formula character came back changed from the first
export or sync, and a tag that sanitizes to nothing ("-") made every export
fail validation. Picking photos also lost the old composer's toasts: an
unreadable image failed silently and photos past the per-postcard limit were
dropped without a word.
…sync A postcard saved by the composer before it cleaned tags can hold one such as "-" or a lone bidi mark. The schema rejects a tag that sanitizes to nothing, so buildFile's self-validation threw and every backup and sync of that device failed. Drop such tags before validating, as empty photo arrays already are.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A postcard tag typed as a lone
-makes every JSON backup and every sync fail witha tag cannot be empty, until that tag is removed by hand. The new postcard composer stores its title, text, folder, captions and tags as typed, while the file format cleans each one on export, so a tag that cleans down to nothing fails validation and anything carrying a control character or a direction override comes back changed after a backup or a sync.The composer now stores the cleaned values, with the same function and length limits the file format applies, so a backup gives back what was saved. A tag that cleans away is never added. An export also drops such a tag before it validates, so a device that already holds one still backs up and syncs.
The composer also reports photo problems again, as the previous one did: an image it cannot read shows a message, and picking more photos than a postcard holds says how many were added.
Stories saved before this change keep the text they were stored with.