mirror of
https://github.com/openai/codex.git
synced 2026-06-02 11:22:01 +00:00
fix(config): implement test filesystem canonicalization
This commit is contained in:
@@ -14,6 +14,16 @@ struct TestFileSystem;
|
||||
|
||||
#[async_trait]
|
||||
impl ExecutorFileSystem for TestFileSystem {
|
||||
async fn canonicalize(
|
||||
&self,
|
||||
path: &AbsolutePathBuf,
|
||||
_sandbox: Option<&FileSystemSandboxContext>,
|
||||
) -> FileSystemResult<AbsolutePathBuf> {
|
||||
let path = tokio::fs::canonicalize(path.as_path()).await?;
|
||||
AbsolutePathBuf::try_from(path)
|
||||
.map_err(|err| io::Error::new(io::ErrorKind::InvalidData, err))
|
||||
}
|
||||
|
||||
async fn read_file(
|
||||
&self,
|
||||
path: &AbsolutePathBuf,
|
||||
|
||||
Reference in New Issue
Block a user