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:
iceweasel-oai authored and GitHub committed 2026-01-05 11:54:21 -08:00
1 parent 720fa67816
commit 95580f229e
3 files changed
+21 -9

No files matched your search

+1 -1
View File
@@ -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()
}