diff --git a/sqllogictest/src/runner.rs b/sqllogictest/src/runner.rs index 67252ec..b327b7c 100644 --- a/sqllogictest/src/runner.rs +++ b/sqllogictest/src/runner.rs @@ -1023,11 +1023,9 @@ impl> Runner { // for every slt file, we create a database against table conflict let file = file.unwrap(); let db_name = file - .file_name() - .expect("not a valid filename") .to_str() - .expect("not a UTF-8 filename"); - let db_name = db_name.replace([' ', '.', '-'], "_"); + .ok_or_else(|| anyhow!("not a UTF-8 filename"))?; + let db_name = db_name.replace([' ', '.', '-', '/'], "_"); self.conn .run_default(&format!("CREATE DATABASE {db_name};"))