mirror of
https://github.com/openai/codex.git
synced 2026-11-07 20:30:33 +00:00
fix: hide preserved path masks from git status
Represent missing .agents and .codex preserved path masks as read-only empty directories instead of empty files so Git ignores them while cleanup still removes the host mount targets after bwrap exits. Co-authored-by: Codex <noreply@openai.com>
This commit is contained in:
committed by
Eva Wong
co-authored by
Codex
parent
87266432a0
commit
eb7a3bfa0c
@@ -37,6 +37,10 @@ pub fn is_preserved_path_name(name: &OsStr) -> bool {
|
||||
.any(|preserved| name == OsStr::new(preserved))
|
||||
}
|
||||
|
||||
pub fn is_preserved_directory_path_name(name: &OsStr) -> bool {
|
||||
name == OsStr::new(PRESERVED_AGENTS_PATH_NAME) || name == OsStr::new(PRESERVED_CODEX_PATH_NAME)
|
||||
}
|
||||
|
||||
/// Returns the preserved workspace metadata name when an agent write to `path`
|
||||
/// should be blocked before execution.
|
||||
pub fn forbidden_agent_preserved_path_write(
|
||||
|
||||
Reference in New Issue
Block a user