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: add separate storage dir for state #84

Merged
merged 1 commit into from
Sep 12, 2023
Merged

Conversation

bryanoltman
Copy link
Contributor

Description

Adds a separate directory to store UpdateState (distinct from downloaded artifacts) to avoid UpdaterState getting wiped out between release versions on Android.

Part of shorebirdtech/shorebird#1239

Type of Change

  • ✨ New feature (non-breaking change which adds functionality)
  • 🛠️ Bug fix (non-breaking change which fixes an issue)
  • ❌ Breaking change (fix or feature that would cause existing functionality to change)
  • 🧹 Code refactor
  • ✅ Build configuration change
  • 📝 Documentation
  • 🗑️ Chore

@codecov
Copy link

codecov bot commented Sep 12, 2023

Codecov Report

Patch coverage: 91.07% and project coverage change: -0.15% ⚠️

Comparison is base (84cfcf5) 95.79% compared to head (fd8cd13) 95.65%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #84      +/-   ##
==========================================
- Coverage   95.79%   95.65%   -0.15%     
==========================================
  Files          17       17              
  Lines        2164     2185      +21     
==========================================
+ Hits         2073     2090      +17     
- Misses         91       95       +4     
Flag Coverage Δ
library 97.36% <91.07%> (-0.17%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Changed Coverage Δ
library/src/cache.rs 94.87% <73.68%> (-0.75%) ⬇️
library/src/c_api.rs 99.49% <100.00%> (+<0.01%) ⬆️
library/src/config.rs 100.00% <100.00%> (ø)
library/src/updater.rs 96.84% <100.00%> (+0.02%) ⬆️

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

cache_path.push("downloads");
let download_dir = cache_path;
let mut code_cache_path = std::path::PathBuf::from(&app_config.code_cache_dir);
code_cache_path.push("downloads");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suspect Android may have yet a 3rd directory for downloads. 🤣

@bryanoltman bryanoltman merged commit b4024cf into main Sep 12, 2023
@bryanoltman bryanoltman deleted the bo/storage-dir branch September 12, 2023 20:13
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