Skip to content

Commit

Permalink
don't canonicalize paths on windows when focusing a path (#899)
Browse files Browse the repository at this point in the history
  • Loading branch information
Canop authored Jul 7, 2024
1 parent f0ebd2c commit 5e3499d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/browser/browser_state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,13 @@ impl BrowserState {
con: &AppContext,
dam: &Dam,
) -> Result<BrowserState, TreeBuildError> {

// on windows, canonicalize the path produces UNC paths, so we don't do it.
// On other platforms, it's a desirable step, mainly because it simplifies the
// paths you'd get for example when focusing a relative symlink containing "..".
#[cfg(not(target_os = "windows"))]
let path = path.canonicalize().unwrap_or(path);

let pending_task = options.pattern
.take()
.as_option()
Expand Down

0 comments on commit 5e3499d

Please sign in to comment.