mirror of
https://github.com/openai/codex.git
synced 2026-11-13 14:46:14 +00:00
path-uri: clarify host-native path conversion (#29501)
## Why Downstream refactors are producing confusing code with this functionality having a very generic name. Encoding the specific conversion approach in the method name makes it clearer. ## What Rename `PathUri::from_path` to `PathUri::from_host_native_path` and update its Rust call sites.
This commit is contained in:
1 parent
c53b1dae09
commit
11fab432be
31 files changed
+250
-198
No files matched your search
@@ -121,7 +121,7 @@ impl PathUri {
|
||||
/// Relative paths are reported as invalid input. Absolute paths without a
|
||||
/// valid URI representation use the fallback documented on
|
||||
/// [`Self::from_abs_path`].
|
||||
pub fn from_path(path: impl AsRef<Path>) -> io::Result<Self> {
|
||||
pub fn from_host_native_path(path: impl AsRef<Path>) -> io::Result<Self> {
|
||||
let path = AbsolutePathBuf::from_absolute_path_checked(path)
|
||||
.map_err(|err| io::Error::new(io::ErrorKind::InvalidInput, err))?;
|
||||
Ok(Self::from_abs_path(&path))
|
||||
|
||||
Reference in new issue
Block a user