don't unwrap for path.extension() in manifest migration (#254)

should fix #253
This commit is contained in:
Carson McManus 2023-06-29 18:16:52 -04:00 committed by GitHub
parent f7f9c916ba
commit 6c4af1c9de
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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();
}
}