R3.1: real paths without \?\ on Windows (dunce); old recent lists read plain

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
ZacharyZhang-NYandClaude Opus 5.5 committed 2026-10-12 18:46:37 -04:00
1 parent 1066b41cb0
commit d0b5aede95
21 files changed
+59 -24

No files matched your search

+2 -2
View File
@@ -14,14 +14,14 @@ use crate::{After, Closing, Dialog, Engine, Host, Opening, Tab, Tabs, in_window,
/// The file a path names, links resolved.
fn identity(path: &Path) -> io::Result<PathBuf> {
match std::fs::canonicalize(path) {
match dunce::canonicalize(path) {
Ok(real) => Ok(real),
Err(error) if error.kind() == io::ErrorKind::NotFound => {
let parent = path.parent().unwrap_or(Path::new("."));
let name = path
.file_name()
.ok_or_else(|| io::Error::other("no file name"))?;
Ok(std::fs::canonicalize(parent)?.join(name))
Ok(dunce::canonicalize(parent)?.join(name))
}
Err(error) => Err(error),
}