Skip to content

Commit

Permalink
fix: dialog default path on Linux, closes #3091 (#3123)
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasfernog committed Dec 27, 2021
1 parent 722d9ed commit 2212bd5
Show file tree
Hide file tree
Showing 8 changed files with 122 additions and 197 deletions.
6 changes: 6 additions & 0 deletions .changes/fix-dialog-default-path.md
@@ -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
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
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
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

0 comments on commit 2212bd5

Please sign in to comment.