From e30b4f1aaa3e93d5542cbc59eb2631911a523d45 Mon Sep 17 00:00:00 2001 From: Audrow Nash Date: Thu, 6 Jul 2023 20:44:20 +0000 Subject: [PATCH] Save with extension Signed-off-by: Audrow Nash --- rmf_site_editor/src/site/save.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/rmf_site_editor/src/site/save.rs b/rmf_site_editor/src/site/save.rs index 42972aa7..7659da61 100644 --- a/rmf_site_editor/src/site/save.rs +++ b/rmf_site_editor/src/site/save.rs @@ -907,7 +907,10 @@ pub fn generate_site( pub fn save_site(world: &mut World) { let save_events: Vec<_> = world.resource_mut::>().drain().collect(); for save_event in save_events { - let path = save_event.to_file; + let mut path = save_event.to_file; + if !path.ends_with("site.ron") { + path = path.with_extension("site.ron"); + } println!( "Saving to {}", path.to_str().unwrap_or("")