From 8899cc1ff10fcc8ebddf187284775af5b6b909fb Mon Sep 17 00:00:00 2001 From: LovecraftianHorror Date: Sat, 27 Mar 2021 09:31:49 -0400 Subject: [PATCH] Fix crash from `.version` file having no extension (#311) --- 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)?;