mirror of
https://codeberg.org/icewind/haze.git
synced 2026-06-03 17:14:08 +02:00
nix ci
This commit is contained in:
parent
d4ac27389e
commit
2f4766ad8a
6 changed files with 231 additions and 117 deletions
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue