Skip to content

Commit fffeb13

Browse files
committed
fix resource_dir() on windows
due to rust feature on windows rust-lang/rust#99931 use dunce::canonicalize() to get proper name
1 parent 081449d commit fffeb13

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

core/tauri-utils/src/platform.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -350,6 +350,13 @@ mod tests {
350350

351351
use crate::{Env, PackageInfo};
352352

353+
#[test]
354+
fn test_current_exe() {
355+
let current = super::current_exe().unwrap();
356+
let current_expected = std::env::current_exe().unwrap();
357+
assert_eq!(current, current_expected);
358+
}
359+
353360
#[test]
354361
fn resolve_resource_dir() {
355362
let package_info = PackageInfo {

core/tauri-utils/src/platform/starting_binary.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ impl StartingBinary {
3434
}
3535

3636
// we canonicalize the path to resolve any symlinks to the real exe path
37-
Self(dangerous_path.canonicalize())
37+
Self(dunce::canonicalize(dangerous_path))
3838
}
3939

4040
/// A clone of the [`PathBuf`] found to be the starting path.

0 commit comments

Comments
 (0)