1
0
Fork 0
mirror of https://codeberg.org/icewind/haze.git synced 2026-06-03 17:14:08 +02:00
This commit is contained in:
Robin Appelman 2023-06-15 18:18:35 +02:00
commit 2f4766ad8a
6 changed files with 231 additions and 117 deletions

View file

@ -32,9 +32,10 @@ impl DatabaseFamily {
}
}
#[derive(Clone, Debug, Eq, PartialEq)]
#[derive(Clone, Debug, Eq, PartialEq, Default)]
#[allow(dead_code)]
pub enum Database {
#[default]
Sqlite,
Mysql,
Mysql80,
@ -56,12 +57,6 @@ pub enum Database {
Oracle,
}
impl Default for Database {
fn default() -> Self {
Database::Sqlite
}
}
impl FromStr for Database {
type Err = Report;

View file

@ -158,8 +158,8 @@ async fn serve(instances: ActiveInstances, listen: String, base_address: String)
let listen: PathBuf = listen.into();
if let Some(parent) = listen.parent() {
if !parent.exists() {
create_dir_all(&parent).into_diagnostic()?;
set_permissions(&parent, PermissionsExt::from_mode(0o755)).into_diagnostic()?;
create_dir_all(parent).into_diagnostic()?;
set_permissions(parent, PermissionsExt::from_mode(0o755)).into_diagnostic()?;
}
}
remove_file(&listen).ok();