Skip to content

Commit

Permalink
Save with extension
Browse files Browse the repository at this point in the history
Signed-off-by: Audrow Nash <audrow@intrinsic.ai>
  • Loading branch information
audrow committed Jul 6, 2023
1 parent f796e44 commit e30b4f1
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion rmf_site_editor/src/site/save.rs
Original file line number Diff line number Diff line change
Expand Up @@ -907,7 +907,10 @@ pub fn generate_site(
pub fn save_site(world: &mut World) {
let save_events: Vec<_> = world.resource_mut::<Events<SaveSite>>().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("<failed to render??>")
Expand Down

0 comments on commit e30b4f1

Please sign in to comment.