fix: expand SQLite home paths - #579
Conversation
|
I pulled this down and tested it against real SQLite files in my home directory rather than just reading the diff. Short version: the helper itself is correct and does exactly what it says, but the fix stops one layer short of working, so #165 is still broken after this lands. Details below. What I ranTests, on your branch (that bit matters here, on my own branch they silently don't exist): Small heads up on the validation line in the description: Then I staged
So the pool manager half genuinely works, and it works everywhere, because every SQLite operation in the driver funnels through Also The blocker: the new code never gets reached
// src-tauri/src/commands.rs:2272
if drv.manifest().capabilities.file_based { // sqlite -> true (drivers/sqlite/mod.rs:990)
let db_path = std::path::Path::new(resolved_params.database.primary());
if !db_path.exists() { // "~/db.sqlite" -> false, I checked
return Err(format!("Database file not found: {}", resolved_params.database));
And this is not only the Test Connection button, it is the preflight on the normal connect flow:
So with this PR merged, a One more thing worth mentioning in the description: the pre-fix failure is a hard Smaller things
Where I landRequesting changes, but only just. The approach is right and I would happily merge it with two things done: expand the path in the For whoever verifies afterwards, here is the setup I used: sqlite3 ~/pr579-db.sqlite "CREATE TABLE customers(id INTEGER PRIMARY KEY, name TEXT); \
INSERT INTO customers(name) VALUES('alice'),('bob'); \
CREATE VIEW customer_names AS SELECT name FROM customers;"
mkdir -p ~/pr579dir && sqlite3 ~/pr579dir/data.sqlite \
"CREATE TABLE orders(id INTEGER PRIMARY KEY, total REAL); INSERT INTO orders(total) VALUES(9.99);"
|
Summary
~/,~\, and bare~before creating SQLite connection options.~userpaths unchanged.Validation
cargo test --lib pool_manager::tests --no-runFixes #165