voelin-ui: keep avatars and icons next to the database on Android
The engine caches avatars and icons in the platform's cache directory, which Android does not have (it would resolve to a relative path). A host that names the data directory gets the cache in <data>/images. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NJvYyRmTjKcb9i8eyYXK5G
This commit is contained in:
1 parent
60a5ff7a68
commit
b8c8bc4aae
1 file changed
+5
@@ -358,6 +358,11 @@ pub fn run(options: RunOptions) -> Result<()> {
|
||||
|
||||
// VOELIN_DATA_DIR isolates the database; the other development
|
||||
// switches are in dev.rs.
|
||||
// A host that names the data directory (Android) has no platform cache
|
||||
// directory either: avatars and icons go next to the database.
|
||||
if let Some(dir) = &options.data_dir {
|
||||
engine.send(Command::AttachCache(dir.join("images")));
|
||||
}
|
||||
let dir: PathBuf = match (options.data_dir, std::env::var_os("VOELIN_DATA_DIR")) {
|
||||
(Some(dir), _) => dir,
|
||||
(None, Some(dir)) => dir.into(),
|
||||
|
||||
Reference in new issue
Block a user