mirror of
https://github.com/armbian/imager.git
synced 2026-01-06 12:31:28 -08:00
Fix image extension filter to include oowow.img.xz and similar files
This commit is contained in:
@@ -29,9 +29,11 @@ fn capitalize_vendor(vendor: &str) -> String {
|
||||
}
|
||||
|
||||
/// Check if file extension is a valid image file
|
||||
/// Valid extensions: img.xz, oowow.img.xz, kebab.img.xz, etc.
|
||||
/// Invalid extensions: .asc, .torrent, .sha
|
||||
fn is_valid_image_extension(ext: &str) -> bool {
|
||||
let ext_lower = ext.to_lowercase();
|
||||
ext_lower.starts_with("img")
|
||||
ext_lower.contains("img")
|
||||
&& !ext_lower.contains("asc")
|
||||
&& !ext_lower.contains("torrent")
|
||||
&& !ext_lower.contains("sha")
|
||||
|
||||
Reference in New Issue
Block a user