mirror of
https://codeberg.org/icewind/nextcloud-config-parser.git
synced 2026-06-03 08:34:13 +02:00
fix handling of pgsql sockets without hostname
This commit is contained in:
parent
ffc38e3ae1
commit
9ebb0f08ac
3 changed files with 49 additions and 0 deletions
|
|
@ -284,6 +284,9 @@ fn parse_db_options(parsed: &Value) -> Result<Database> {
|
|||
}
|
||||
|
||||
fn split_host(host: &str) -> (&str, Option<u16>, Option<&str>) {
|
||||
if host.starts_with('/') {
|
||||
return ("localhost", None, Some(host));
|
||||
}
|
||||
let mut parts = host.split(':');
|
||||
let host = parts.next().unwrap();
|
||||
match parts
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue