forked from coracle/caravel
More billing work
This commit is contained in:
+5
-6
@@ -80,12 +80,11 @@ async fn main() -> Result<()> {
|
||||
}
|
||||
|
||||
fn ensure_sqlite_dir(database_url: &str) -> Result<()> {
|
||||
if let Some(path) = database_url.strip_prefix("sqlite://") {
|
||||
if let Some(dir) = std::path::Path::new(path).parent() {
|
||||
if !dir.as_os_str().is_empty() {
|
||||
std::fs::create_dir_all(dir)?;
|
||||
}
|
||||
}
|
||||
if let Some(path) = database_url.strip_prefix("sqlite://")
|
||||
&& let Some(dir) = std::path::Path::new(path).parent()
|
||||
&& !dir.as_os_str().is_empty()
|
||||
{
|
||||
std::fs::create_dir_all(dir)?;
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user