chore: only handle .ezpplauncher-theme files
This commit is contained in:
1 parent
b8a0b448c7
commit
00958d5238
1 file changed
+10
-3
+10
-3
@@ -1,6 +1,6 @@
|
|||||||
// Learn more about Tauri commands at https://tauri.app/develop/calling-rust/
|
// Learn more about Tauri commands at https://tauri.app/develop/calling-rust/
|
||||||
use std::sync::Mutex;
|
|
||||||
use std::path::PathBuf;
|
use std::path::PathBuf;
|
||||||
|
use std::sync::Mutex;
|
||||||
use tauri::Manager;
|
use tauri::Manager;
|
||||||
|
|
||||||
pub mod commands;
|
pub mod commands;
|
||||||
@@ -50,10 +50,17 @@ pub fn run() {
|
|||||||
|
|
||||||
if let Ok(url) = url::Url::parse(&maybe_file) {
|
if let Ok(url) = url::Url::parse(&maybe_file) {
|
||||||
if let Ok(path) = url.to_file_path() {
|
if let Ok(path) = url.to_file_path() {
|
||||||
files.push(path);
|
if path.extension().and_then(|str| str.to_str())
|
||||||
|
== Some("ezpplauncher-theme")
|
||||||
|
{
|
||||||
|
files.push(path);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
files.push(PathBuf::from(maybe_file))
|
let maybe_file_path = PathBuf::from(maybe_file);
|
||||||
|
if maybe_file_path.extension().and_then(|str| str.to_str()) == Some("ezpplauncher-theme") {
|
||||||
|
files.push(maybe_file_path);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user