Порівняти коміти

...
Автор SHA1 Повідомлення Дата
l0ng-ai 51917f068d fix(welcome): expand JetBrains path variables without re-checking the base
A $USER_HOME$ or $APPLICATION_CONFIG_DIR$ path joins onto a folder that is
already absolute, so only a path without a variable is checked with
is_absolute. The unit test's Unix home made the re-check fail on Windows.
2026-12-01 01:32:30 +08:00
+5 -5
Переглянути файл
@@ -276,11 +276,11 @@ fn expand_jetbrains_path(raw: &str, home: Option<&Path>, config: &Path) -> Optio
return None;
}
let rest = if cfg!(windows) { rest.replace('/', "\\") } else { rest.to_owned() };
let path = match base {
Some(base) => base.join(rest.trim_start_matches(['/', '\\'])),
None => PathBuf::from(rest),
};
path.is_absolute().then_some(path)
// `home` and `config` are absolute already; only a path without a variable is checked.
match base {
Some(base) => Some(base.join(rest.trim_start_matches(['/', '\\']))),
None => Some(PathBuf::from(rest)).filter(|p| p.is_absolute()),
}
}
impl RecentProjects {