mirror of
https://github.com/cexll/myclaude.git
synced 2026-03-01 15:03:45 +08:00
* fix(cleanup): resolve macOS symlink mismatch causing all log files to be kept On macOS, os.TempDir() returns /var/folders/... while filepath.EvalSymlinks resolves to /private/var/folders/... (since /var is a symlink to /private/var). isUnsafeFile was comparing filepath.Abs(tempDir) against EvalSymlinks(file), causing filepath.Rel to produce a path starting with "../../../../../private/..." which triggered the "file is outside tempDir" guard. As a result, --cleanup kept all 1367 log files instead of deleting any. Fix: use evalSymlinksFn on tempDir as well, so both sides of the comparison are resolved consistently. Falls back to filepath.Abs if symlink resolution fails. * test(logger): fix isUnsafeFile eval symlinks stubs --------- Co-authored-by: cexll <evanxian9@gmail.com>
17 KiB
17 KiB