| Age | Commit message (Collapse) | Author | Files | Lines |
|
Split the dismiss test so expiry is exercised on its own: Expire removes
the image without deleting the inert entry, and nothing asserted it.
removeImage now requires filepath.Dir(filepath.Clean(path)) to equal the
image directory, so a path carrying .. cannot reach a sibling daemon file
such as queue.json. The previous prefix test accepted it. Not exploitable
until Task 4 populates Popup.Image from a client hint, which is exactly
why the guard is fixed now.
|
|
Popup gains image, and the store calls an injected removeImage when an
entry is dismissed, evicted, replaced or expired, so a daemon-written
PNG does not outlive its balloon. The service decides what is
daemon-owned; the store only names the path.
NewStore now takes the callback as a third parameter, so the service
wires its removeImage in (unlinking only under ImagesDir) and the
existing call sites pass nil.
|
|
Remove the temp file on every writeJSON failure path, not just the write
and close ones. A failed rename left the temp behind with no cleanup.
Surface the list path's unmarshal error instead of printing null with exit
0, and make a non-positive history limit print an empty array rather than
falling through to the whole ring.
Assert the evicted item actually lands in the history ring, so the "files
to history" half of eviction is covered rather than just its signal.
Add the missing README License section beside the GPLv2 text and headers.
|
|
The store holds the live queue and the history ring as pure state. Expiry
tells the client and keeps the entry inert; dismissal and eviction file it
in history. Replacing reuses the id and emits nothing.
|