Skip to content

Commit c97c408

Browse files
committed
fix: build failed
1 parent 6c8f179 commit c97c408

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

plugins/dialog/src/desktop.rs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ use rfd::{AsyncFileDialog, AsyncMessageDialog};
1313
use serde::de::DeserializeOwned;
1414
use tauri::{plugin::PluginApi, AppHandle, Runtime};
1515

16-
use crate::{models::*, FileDialogBuilder, FilePath, MessageDialogBuilder};
16+
use crate::{models::*, FileDialogBuilder, FilePath, MessageDialogBuilder, StopAccessingPath};
1717

1818
pub fn init<R: Runtime, C: DeserializeOwned>(
1919
app: &AppHandle<R>,
@@ -211,6 +211,13 @@ pub fn save_file<R: Runtime, F: FnOnce(Option<FilePath>) + Send + 'static>(
211211
});
212212
}
213213

214+
pub fn stop_accessing_path<R: Runtime>(
215+
_dialog: FileDialogBuilder<R>,
216+
_p: StopAccessingPath,
217+
) -> bool {
218+
true
219+
}
220+
214221
/// Shows a message dialog
215222
pub fn show_message_dialog<R: Runtime, F: FnOnce(MessageDialogResult) + Send + 'static>(
216223
dialog: MessageDialogBuilder<R>,

plugins/dialog/src/mobile.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ pub fn stop_accessing_path<R: Runtime>(dialog: FileDialogBuilder<R>, p: StopAcce
114114
.0
115115
.run_mobile_plugin::<()>("stopAccessingPath", p);
116116

117-
if let Err(_) = res {
117+
if res.is_err() {
118118
return false;
119119
}
120120
}

0 commit comments

Comments
 (0)