mirror of
https://github.com/openai/codex.git
synced 2026-11-27 23:31:09 +00:00
never let sandbox write to .codex/ or .codex/.sandbox/ (#8683)
Never treat .codex or .codex/.sandbox as a workspace root. Handle write permissions to .codex/.sandbox in a single method so that the sandbox setup/runner can write logs and other setup files to that directory.
This commit is contained in:
1 parent
720fa67816
commit
95580f229e
3 files changed
+21
-9
No files matched your search
@@ -30,7 +30,7 @@ const SKIP_DIR_SUFFIXES: &[&str] = &[
|
||||
"/programdata",
|
||||
];
|
||||
|
||||
fn normalize_path_key(p: &Path) -> String {
|
||||
pub(crate) fn normalize_path_key(p: &Path) -> String {
|
||||
let n = dunce::canonicalize(p).unwrap_or_else(|_| p.to_path_buf());
|
||||
n.to_string_lossy().replace('\\', "/").to_ascii_lowercase()
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user