From 0422fd906ed030828a02634f137cbd36e3ba974a Mon Sep 17 00:00:00 2001 From: Lovecraftian Horror Date: Fri, 26 Mar 2021 13:58:24 -0400 Subject: [PATCH] Fix crash from `.version` file having no extension --- src/odin/mods/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/odin/mods/mod.rs b/src/odin/mods/mod.rs index eba346ff..11df0f2f 100644 --- a/src/odin/mods/mod.rs +++ b/src/odin/mods/mod.rs @@ -46,7 +46,7 @@ impl ZipExt for ZipArchive { } // Don't overwrite old cfg files - if outpath.extension().unwrap() == "cfg" && outpath.exists() { + if outpath.extension().unwrap_or_default() == "cfg" && outpath.exists() { outpath = outpath.with_extension("cfg.new"); } let mut outfile = File::create(&outpath)?;