mirror of
https://github.com/Horizontal42/summarum.git
synced 2026-11-10 15:42:01 +03:00
Fix insecure extension check in read_sheet_file and run cargo fmt
Co-authored-by: Horizontal42 <75383519+Horizontal42@users.noreply.github.com>
This commit is contained in:
parent
5b115d27f7
commit
f65806403a
1 changed files with 4 additions and 6 deletions
|
|
@ -938,12 +938,10 @@ fn load_extensions(app: AppHandle) -> Vec<ExtensionScript> {
|
|||
}
|
||||
|
||||
fn is_sheet_path(path: &str) -> bool {
|
||||
std::path::Path::new(path)
|
||||
.extension()
|
||||
.map_or(false, |ext| {
|
||||
let ext = ext.to_string_lossy().to_lowercase();
|
||||
ext == "numi" || ext == "sum"
|
||||
})
|
||||
std::path::Path::new(path).extension().map_or(false, |ext| {
|
||||
let ext = ext.to_string_lossy().to_lowercase();
|
||||
ext == "numi" || ext == "sum"
|
||||
})
|
||||
}
|
||||
|
||||
/// A sheet handed to us by the OS (file association, second launch): same
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue