fallback to root directory if fyrox-template script cant find game/src

This commit is contained in:
Dmitry
2023-09-26 20:35:57 +03:00
parent 7c00eac90e
commit cbc9442333
+3 -2
View File
@@ -560,9 +560,10 @@ fn init_data(base_path: &Path, style: &str) {
}
fn init_script(raw_name: &str) {
let base_path = Path::new("game/src/");
let mut base_path = Path::new("game/src/");
if !base_path.exists() {
panic!("game/src directory does not exists!")
eprintln!("game/src directory does not exists! Fallback to root directory...");
base_path = Path::new("");
}
let script_file_stem = raw_name.to_case(Case::Snake);