auto-copiar alpha.db al Desktop cada vez que se ejecuta la app
This commit is contained in:
@@ -301,6 +301,14 @@ async fn get_conn(db_path: &str) -> Result<libsql::Connection, String> {
|
||||
.await
|
||||
.map_err(|e| format!("Migration: {e}"))?;
|
||||
|
||||
// Copiar DB al Desktop para acceso rápido con DBeaver
|
||||
let _ = std::fs::copy(
|
||||
db_path,
|
||||
dirs_next::desktop_dir()
|
||||
.unwrap_or_else(|| std::path::PathBuf::from("."))
|
||||
.join("alpha.db"),
|
||||
);
|
||||
|
||||
Ok(conn)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user