ITADN

hooks/ponytail-runtime.js: setMode has no try/catch — disk full crashes hook

#378Opennanaubusiness 创建于 2026-06-27
N
nanaubusinesscommented
In `hooks/ponytail-runtime.js` lines 15-18: ```javascript function setMode(mode) { fs.mkdirSync(path.dirname(statePath), { recursive: true }); fs.writeFileSync(statePath, mode); } ``` No try/catch. If disk is full, permissions are wrong, or path is invalid, this throws and crashes the hook. Should gracefully degrade instead of propagating a crash.
2 条评论