|
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 |
@@ -383,11 +383,6 @@ pub(crate) struct FileDialogPayload<'a> { |
383 | 383 | multiple: bool, |
384 | 384 | } |
385 | 385 |
|
386 | | -#[derive(Debug, Serialize, Deserialize)] |
387 | | -pub struct StopAccessingPath { |
388 | | - path: FilePath, |
389 | | -} |
390 | | - |
391 | 386 | // raw window handle :( |
392 | 387 | unsafe impl<R: Runtime> Send for FileDialogBuilder<R> {} |
393 | 388 |
|
@@ -618,8 +613,8 @@ impl<R: Runtime> FileDialogBuilder<R> { |
618 | 613 | save_file(self, f) |
619 | 614 | } |
620 | 615 |
|
621 | | - pub fn stop_accessing_path(self, p: StopAccessingPath) -> bool { |
622 | | - stop_accessing_path(self, p) |
| 616 | + pub fn destroy_path(self, path: String) -> bool { |
| 617 | + destroy_path(self, path) |
623 | 618 | } |
624 | 619 | } |
625 | 620 |
|
@@ -734,7 +729,7 @@ impl<R: Runtime> FileDialogBuilder<R> { |
734 | 729 | blocking_fn!(self, save_file) |
735 | 730 | } |
736 | 731 |
|
737 | | - pub fn blocking_stop_accessing_path(self, p: StopAccessingPath) -> bool { |
738 | | - self.stop_accessing_path(p) |
| 732 | + pub fn blocking_destroy_path(self, path: String) -> bool { |
| 733 | + self.destroy_path(path) |
739 | 734 | } |
740 | 735 | } |
0 commit comments