Skip to content

Commit

Permalink
Fix crash from .version file having no extension (#311)
Browse files Browse the repository at this point in the history
  • Loading branch information
CosmicHorrorDev authored Mar 27, 2021
1 parent a651d2b commit 8899cc1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/odin/mods/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ impl ZipExt for ZipArchive<File> {
}

// 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)?;
Expand Down

0 comments on commit 8899cc1

Please sign in to comment.