-
Notifications
You must be signed in to change notification settings - Fork 160
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
Always ensure media temp dir exists #1790
Conversation
`RustMediaLoader` creates the "${cacheDir}/temp/media" dir only once at class creation. Unfortunately when clearing an app's cache this directory will be deleted, so subsequent usages of the same instance of `RustMediaLoader` will not work because `cacheDirectory` does not exists. This fix makes sure that such directory is always checked and created if needed. Fixes #1788
📱 Scan the QR code below to install the build (arm64 only) for this PR. |
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## develop #1790 +/- ##
===========================================
- Coverage 63.40% 63.40% -0.01%
===========================================
Files 1292 1292
Lines 33568 33569 +1
Branches 6981 6982 +1
===========================================
Hits 21284 21284
- Misses 9088 9089 +1
Partials 3196 3196
☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you think we should apply the same fix here: https://github.com/vector-im/element-x-android/blob/develop/features/rageshake/impl/src/main/kotlin/io/element/android/features/rageshake/impl/logs/VectorFileLogger.kt#L83 ?
Yes indeed. Done! |
Kudos, SonarCloud Quality Gate passed! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Type of change
Content
RustMediaLoader
creates the "${cacheDir}/temp/media" dir only once at class creation. Unfortunately when clearing an app's cache this directory will be deleted and the app's process won't be killed, so subsequent usages of the same instance ofRustMediaLoader
will not work becausecacheDirectory
does not exists. This fix makes sure that such directory is always checked and created if needed.Motivation and context
Fixes #1788
Screenshots / GIFs
Tests
Tested devices
Checklist