mirror of
https://github.com/openai/codex.git
synced 2026-11-02 19:43:24 +00:00
codex: avoid current dir for absolute normalization
This commit is contained in:
@@ -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()))
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user