|
9 | 9 | html_favicon_url = "https://github.com/tauri-apps/tauri/raw/dev/app-icon.png" |
10 | 10 | )] |
11 | 11 |
|
12 | | -use serde::{Deserialize, Serialize}; |
| 12 | +use serde::Serialize; |
13 | 13 | use tauri::{ |
14 | 14 | plugin::{Builder, TauriPlugin}, |
15 | 15 | Manager, Runtime, |
@@ -180,7 +180,7 @@ pub fn init<R: Runtime>() -> TauriPlugin<R> { |
180 | 180 | .invoke_handler(tauri::generate_handler![ |
181 | 181 | commands::open, |
182 | 182 | commands::save, |
183 | | - commands::stop_accessing_path, |
| 183 | + commands::destroy_path, |
184 | 184 | commands::message, |
185 | 185 | commands::ask, |
186 | 186 | commands::confirm |
@@ -338,11 +338,6 @@ pub(crate) struct FileDialogPayload<'a> { |
338 | 338 | multiple: bool, |
339 | 339 | } |
340 | 340 |
|
341 | | -#[derive(Debug, Serialize, Deserialize)] |
342 | | -pub struct StopAccessingPath { |
343 | | - path: FilePath, |
344 | | -} |
345 | | - |
346 | 341 | // raw window handle :( |
347 | 342 | unsafe impl<R: Runtime> Send for FileDialogBuilder<R> {} |
348 | 343 |
|
@@ -573,8 +568,8 @@ impl<R: Runtime> FileDialogBuilder<R> { |
573 | 568 | save_file(self, f) |
574 | 569 | } |
575 | 570 |
|
576 | | - pub fn stop_accessing_path(self, p: StopAccessingPath) -> bool { |
577 | | - stop_accessing_path(self, p) |
| 571 | + pub fn destroy_path(self, path: String) -> bool { |
| 572 | + destroy_path(self, path) |
578 | 573 | } |
579 | 574 | } |
580 | 575 |
|
@@ -689,7 +684,7 @@ impl<R: Runtime> FileDialogBuilder<R> { |
689 | 684 | blocking_fn!(self, save_file) |
690 | 685 | } |
691 | 686 |
|
692 | | - pub fn blocking_stop_accessing_path(self, p: StopAccessingPath) -> bool { |
693 | | - self.stop_accessing_path(p) |
| 687 | + pub fn blocking_destroy_path(self, path: String) -> bool { |
| 688 | + self.destroy_path(path) |
694 | 689 | } |
695 | 690 | } |
0 commit comments