From d3464567d0459f103b158ed7e6e2f60df1477502 Mon Sep 17 00:00:00 2001 From: lambda-0x <0xlambda@protonmail.com> Date: Sat, 8 Jun 2024 15:00:11 +0530 Subject: [PATCH] fix directory creation --- crates/dojo-world/src/manifest/mod.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/crates/dojo-world/src/manifest/mod.rs b/crates/dojo-world/src/manifest/mod.rs index 1307885f70..5391761e49 100644 --- a/crates/dojo-world/src/manifest/mod.rs +++ b/crates/dojo-world/src/manifest/mod.rs @@ -147,6 +147,8 @@ impl BaseManifest { impl OverlayManifest { pub fn load_from_path(path: &Utf8PathBuf) -> Result { + fs::create_dir_all(path)?; + let mut world: Option = None; let world_path = path.join(WORLD_CONTRACT_NAME.replace("::", "_")).with_extension("toml"); @@ -184,7 +186,7 @@ impl OverlayManifest { /// - `world` and `base` manifest are written to root of the folder. /// - `contracts` and `models` are written to their respective directories. pub fn write_to_path_nested(&self, path: &Utf8PathBuf) -> Result<(), AbstractManifestError> { - fs::create_dir_all(path.parent().unwrap())?; + fs::create_dir_all(path)?; if let Some(ref world) = self.world { let world = toml::to_string(world)?;