Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: dialog default path on Linux, closes #3091 #3123

Merged
merged 2 commits into from
Dec 27, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 6 additions & 0 deletions .changes/fix-dialog-default-path.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"tauri": patch
"api": patch
---

Fixes the dialog `defaultPath` usage on Linux.
2 changes: 1 addition & 1 deletion core/tauri/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ attohttpc = { version = "0.18", features = [ "json", "form" ] }
open = { version = "2.0", optional = true }
shared_child = { version = "1.0", optional = true }
os_pipe = { version = "1.0", optional = true }
rfd = { version = "0.6.2", features = [ "parent" ] }
rfd = { version = "0.6.3", features = [ "parent" ] }
raw-window-handle = "0.4.2"
minisign-verify = { version = "0.2", optional = true }
os_info = { version = "3.0.9", optional = true }
Expand Down
3 changes: 0 additions & 3 deletions core/tauri/src/endpoints/dialog.rs
Original file line number Diff line number Diff line change
Expand Up @@ -150,9 +150,6 @@ pub fn open<R: Runtime>(
dialog_builder = dialog_builder.set_parent(window);
}
if let Some(default_path) = options.default_path {
if !default_path.exists() {
return Err(crate::Error::DialogDefaultPathNotExists(default_path));
}
dialog_builder = set_default_path(dialog_builder, default_path);
}
for filter in options.filters {
Expand Down

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion examples/api/dist/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<link rel="stylesheet" href="/global.css" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Svelte + Vite App</title>
<script type="module" crossorigin src="/assets/index.f1ec7caa.js"></script>
<script type="module" crossorigin src="/assets/index.d86155cb.js"></script>
<link rel="modulepreload" href="/assets/vendor.a59520a9.js">
<link rel="stylesheet" href="/assets/index.b706bb41.css">
</head>
Expand Down