fix: custom path windows size at 0 if no backslash
Some checks failed
Lockbud / lockbud (push) Has been cancelled
Rust / fmt (push) Has been cancelled
Rust / test (push) Has been cancelled
Rust / clippy (macos-latest) (push) Has been cancelled
Rust / clippy (ubuntu-latest) (push) Has been cancelled
Rust / check (macos-latest) (push) Has been cancelled
Rust / check (ubuntu-latest) (push) Has been cancelled
Rust / doc (push) Has been cancelled
Typo / typo (push) Has been cancelled

This commit is contained in:
Cyrix126 2024-12-16 20:22:03 +01:00
parent 8a813a22ca
commit 8510db5604

View file

@ -419,9 +419,9 @@ impl PrivNodeApi {
// https://github.com/monero-project/monero/issues/9513 // https://github.com/monero-project/monero/issues/9513
{ {
if let Ok(metadata) = std::fs::metadata(if !state.path_db.is_empty() { if let Ok(metadata) = std::fs::metadata(if !state.path_db.is_empty() {
let mut path_db = state.path_db.clone(); let mut path_db = std::path::PathBuf::from(&state.path_db);
path_db.push_str("lmdb/data.mdb"); path_db.push("lmdb/data.mdb");
path_db path_db.to_str().unwrap().to_string()
} else { } else {
r#"C:\ProgramData\bitmonero\lmdb\data.mdb"#.to_string() r#"C:\ProgramData\bitmonero\lmdb\data.mdb"#.to_string()
}) { }) {