codex: avoid current dir for absolute normalization

This commit is contained in:
pakrym-oai
2026-04-06 23:21:42 -07:00
parent a958a1741a
commit 15fc7776ee
+5 -1
View File
@@ -51,7 +51,11 @@ impl AbsolutePathBuf {
pub fn from_absolute_path<P: AsRef<Path>>(path: P) -> std::io::Result<Self> {
let expanded = Self::maybe_expand_home_directory(path.as_ref());
let absolute_path = expanded.absolutize()?;
let absolute_path = if expanded.is_absolute() {
expanded.absolutize_from(&expanded)?
} else {
expanded.absolutize()?
};
Ok(Self(absolute_path.into_owned()))
}