# Each non-empty, non-comment line is matched against the tail of each
# source file path (slashes normalized). Files in `*/tests/*` and
# `*/benches/*` directories are blanket-allowed in lib.rs and do NOT need
# entries here.
#
# This allowlist exists for the small set of production source files that
# legitimately reference the banned APIs:
#   - chdir-to-temp on Windows to release the launch-cwd handle (the path
#     is used as a destination, no scratch dir is created there).
#   - the dedicated test-support crate, which is dev-only.
#
# DO NOT add new entries without an inline comment explaining why this
# call site cannot land under `zccache_core::config::default_cache_dir()`.

# Daemon trampoline chdirs to $TMPDIR so the parent's launch-cwd directory
# can be deleted on Windows. The path is the chdir destination, not a
# scratch location. See `release_cwd()`.
crates/zccache-daemon-core/src/daemon/trampoline.rs

# Same release_cwd pattern, duplicated in the cli's compiler-wrap path so
# the cli doesn't need a runtime dep on the daemon crate.
crates/zccache-cli-core/src/cli/commands/wrap.rs

# zccache-test-support is a dev-only crate. The temp-dir cleanup helper
# walks $TMPDIR looking for stale test fixtures; it does not create state
# there at zccache runtime.
crates/zccache-daemon-core/src/test_support/mod.rs

# The legacy temp-root cleanup walks $TMPDIR looking for state older zccache
# installs left there (see `cleanup_legacy_temp_root_state`). Reading the
# system temp dir IS the job — the debris it reclaims is by definition not
# under `~/.zccache/`, so there is nothing to re-root. It creates nothing
# there. Moved here from `run.rs` by #1160, which made it a member of the
# shared maintenance schedule; `run.rs` no longer touches $TMPDIR at all.
crates/zccache-daemon-core/src/daemon/server/maintenance_schedule.rs

# diag.rs reads `std::env::temp_dir()` purely to display its value in a
# diagnostic dump (`zccache wrap --diag`). Nothing is created at the
# path; if the operator's TMPDIR is misconfigured we want to surface
# the value as observed, not a normalized rewrite.
crates/zccache-cli-core/src/cli/commands/wrap/diag.rs

# Same release_cwd pattern as wrap.rs (which is allowlisted above) —
# passthrough.rs chdirs to $TMPDIR before invoking the underlying tool
# so the wrapper's own working directory handle is released. The path
# is the chdir destination, not a scratch location.
crates/zccache-cli-core/src/cli/commands/wrap/passthrough.rs
