mirror of
https://github.com/openai/codex.git
synced 2026-10-20 17:38:45 +00:00
Add an AbsolutePathBuf conversion for FileSystemPath (#38460)
## What changed Implement `From<AbsolutePathBuf>` for `FileSystemPath` and use the conversion when constructing concrete filesystem permission paths. GitOrigin-RevId: 244bcbd0c3f76cd87cc1240458fcac6c9ef0a8e3
This commit is contained in:
@@ -233,9 +233,7 @@ fn add_helper_runtime_permissions(
|
||||
}
|
||||
|
||||
file_system_policy.entries.push(FileSystemSandboxEntry::new(
|
||||
FileSystemPath::Path {
|
||||
path: helper_read_root.clone(),
|
||||
},
|
||||
helper_read_root.clone().into(),
|
||||
FileSystemAccessMode::Read,
|
||||
));
|
||||
}
|
||||
@@ -758,7 +756,7 @@ mod tests {
|
||||
|
||||
fn path_entry(path: AbsolutePathBuf, access: FileSystemAccessMode) -> FileSystemSandboxEntry {
|
||||
FileSystemSandboxEntry {
|
||||
path: FileSystemPath::Path { path },
|
||||
path: path.into(),
|
||||
access,
|
||||
missing_path_behavior: None,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user