Skip to content

Fix for tempDir, "non-ubiquitous" files, and crash on empty conflict#89

Merged
AndreasSko merged 7 commits intomasterfrom
fix_tmpdir
Jun 16, 2025
Merged

Fix for tempDir, "non-ubiquitous" files, and crash on empty conflict#89
AndreasSko merged 7 commits intomasterfrom
fix_tmpdir

Conversation

@AndreasSko
Copy link
Copy Markdown
Owner

@AndreasSko AndreasSko commented Jun 1, 2025

This PR fixes a few issues:

Potential fix for temporary dir issue

As explained in AndreasSko/go-library-merger#166 users reported issues with the temporary directory when importing backups.

With this commit, we explicitly set the temporary directory that is directly provided by the fileManager.

Fix crash on empty conflict

Sometimes the app would crash if - for some reason(?) - there was an empty conflict or one of the sides was empty. With this change, we show a proper error message instead of panicking.

Support downloading "non-ubiquitous" files(?)

Some users recently started to report getting the following error message:

The file couldn’t be opened because you don’t have permission to view it.

During debugging, I noticed that on iOS 18.4 files stored on OneDrive don't seem to be considered ubiquitous items, which triggers that issue. I haven't seen the problem with iOS 18.5, but just to be sure we are now also supporting downloading files that are not ubiquitous.

Also used the change to improve capturing errors for Sentry.

Other changes

Sentry: Add breadcrumbs to JWLMController

This should help with debugging errors by giving more context to an issue.

Some users recently started to report
getting the following error message:

> The file couldn’t be opened because you don’t have permission to view it.

During debugging I noticed that
on iOS 18.4 files stored on OneDrive
don't seem to be considered
ubiquitous items, which triggers
that issue. I haven't seen the problem
with iOS 18.5, but just to be sure
we are now also supporting downloading
files that are not ubiquitous.

Also used the change to improve
capturing erros for Sentry.
Sometimes the app would crash
if - for some reason(?) - there was
an empty conflict or one of the sides
was empty. With this change, we
show a proper error message instead
of panicing.
As explained in
AndreasSko/go-library-merger#166
users reported issues with the
temporary directory when importing
backups.

With this commit we explicitly set
the temporary directory that is
directly provided by the fileManager.
If there is nothing to clean up,
then that is fine. It is not an issue
we need to worry about, so also no
need to capture it for Sentry.
@AndreasSko AndreasSko force-pushed the fix_tmpdir branch 2 times, most recently from 7bba146 to 7ef3df5 Compare June 1, 2025 16:39
@AndreasSko AndreasSko merged commit d636b15 into master Jun 16, 2025
1 of 2 checks passed
@AndreasSko AndreasSko deleted the fix_tmpdir branch June 16, 2025 15:38
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.

1 participant