From 6c4af1c9de68e94a23a38e565c21f07fb3509659 Mon Sep 17 00:00:00 2001 From: Carson McManus Date: Thu, 29 Jun 2023 18:16:52 -0400 Subject: [PATCH] don't `unwrap` for `path.extension()` in manifest migration (#254) should fix #253 --- src/accountmanager/migrate.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/accountmanager/migrate.rs b/src/accountmanager/migrate.rs index 97beb43..5a78eb4 100644 --- a/src/accountmanager/migrate.rs +++ b/src/accountmanager/migrate.rs @@ -22,7 +22,10 @@ pub(crate) fn load_and_migrate( let entry = e.unwrap(); if entry.file_type().unwrap().is_file() { let path = entry.path(); - if path.extension().unwrap() == "maFile" { + let Some(ext) = path.extension() else { + return; + }; + if ext == "maFile" { backup_file(&path).unwrap(); } }