You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 410d0c3
Browse filesBrowse the repository at this point in the historyBrowse files
Recheck the log directories before reusing the file handle
The reused log handle was checked only by lstat of the file path, which
follows links in the parent path. A logs directory replaced by a link
to the folder the open file was moved to led back to the same file, so
entries kept going there; main refused that directory on every write.
The writer now records the app and logs directories when it opens the
file and reuses the handle only while both are still those directories:
real directories, not links, and on POSIX mode 0700. Otherwise it
reopens with the full checks, which refuse a linked directory and
tighten a loosened mode.
New tests: an entry is not appended through a logs folder replaced by
a link (fails before), and on POSIX a loosened logs folder mode is
restored before the next append. Internals describes the directory
check and that each flushLogs call waits for its own close.
Part of #141
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
0 commit comments