From e1634645afcc7da84387b16b90d8db8cee86b498 Mon Sep 17 00:00:00 2001 From: Louis Knight-Webb Date: Tue, 17 Jun 2025 21:00:15 -0400 Subject: [PATCH] Separate dev and prod DBs --- backend/src/main.rs | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/backend/src/main.rs b/backend/src/main.rs index 07882714..fdde70cf 100644 --- a/backend/src/main.rs +++ b/backend/src/main.rs @@ -156,9 +156,13 @@ async fn main() -> anyhow::Result<()> { } fn asset_dir() -> std::path::PathBuf { - // (“com”, “YourOrg”, “MyApp”) → tweak to suit your bundle ID - let proj = ProjectDirs::from("ai", "bloop", env!("CARGO_PKG_NAME")) - .expect("OS didn’t give us a home directory"); + let proj = if cfg!(debug_assertions) { + ProjectDirs::from("ai", "bloop-dev", env!("CARGO_PKG_NAME")) + .expect("OS didn’t give us a home directory") + } else { + ProjectDirs::from("ai", "bloop", env!("CARGO_PKG_NAME")) + .expect("OS didn’t give us a home directory") + }; // ✔ macOS → ~/Library/Application Support/MyApp // ✔ Linux → ~/.local/share/myapp (respects XDG_DATA_HOME)