Skip to content

Commit da3e87d

Browse files
committed
fx
1 parent d27fef9 commit da3e87d

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

codex-rs/windows-sandbox-rs/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ pub use ipc_framed::read_frame;
143143
#[cfg(target_os = "windows")]
144144
pub use ipc_framed::write_frame;
145145
#[cfg(target_os = "windows")]
146-
pub use logging::LOG_FILE_NAME;
146+
pub use logging::current_log_file_path;
147147
#[cfg(target_os = "windows")]
148148
pub use logging::log_note;
149149
#[cfg(target_os = "windows")]

codex-rs/windows-sandbox-rs/src/setup_main_win.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@ use anyhow::Context;
66
use anyhow::Result;
77
use base64::Engine;
88
use base64::engine::general_purpose::STANDARD as BASE64;
9-
use codex_windows_sandbox::LOG_FILE_NAME;
109
use codex_windows_sandbox::SETUP_VERSION;
1110
use codex_windows_sandbox::SetupErrorCode;
1211
use codex_windows_sandbox::SetupErrorReport;
1312
use codex_windows_sandbox::SetupFailure;
1413
use codex_windows_sandbox::add_deny_write_ace;
1514
use codex_windows_sandbox::canonicalize_path;
1615
use codex_windows_sandbox::convert_string_sid_to_sid;
16+
use codex_windows_sandbox::current_log_file_path;
1717
use codex_windows_sandbox::ensure_allow_mask_aces_with_inheritance;
1818
use codex_windows_sandbox::ensure_allow_write_aces;
1919
use codex_windows_sandbox::extract_setup_failure;
@@ -103,7 +103,7 @@ enum SetupMode {
103103
ReadAclsOnly,
104104
}
105105

106-
fn log_line(log: &mut File, msg: &str) -> Result<()> {
106+
fn log_line(log: &mut dyn Write, msg: &str) -> Result<()> {
107107
let ts = chrono::Utc::now().to_rfc3339();
108108
writeln!(log, "[{ts}] {msg}").map_err(|err| {
109109
anyhow::Error::new(SetupFailure::new(
@@ -349,7 +349,7 @@ pub fn main() -> Result<()> {
349349
if let Ok(codex_home) = std::env::var("CODEX_HOME") {
350350
let sbx_dir = sandbox_dir(Path::new(&codex_home));
351351
let _ = std::fs::create_dir_all(&sbx_dir);
352-
let log_path = sbx_dir.join(LOG_FILE_NAME);
352+
let log_path = current_log_file_path(&sbx_dir);
353353
if let Ok(mut f) = File::options().create(true).append(true).open(&log_path) {
354354
let _ = writeln!(
355355
f,
@@ -400,7 +400,7 @@ fn real_main() -> Result<()> {
400400
format!("failed to create sandbox dir {}: {err}", sbx_dir.display()),
401401
))
402402
})?;
403-
let log_path = sbx_dir.join(LOG_FILE_NAME);
403+
let log_path = current_log_file_path(&sbx_dir);
404404
let mut log = File::options()
405405
.create(true)
406406
.append(true)

0 commit comments

Comments
 (0)