From f6fede38fe4c6faf4662a72cc36c2c57982a5ae2 Mon Sep 17 00:00:00 2001 From: AndyHazz <517731+AndyHazz@users.noreply.github.com> Date: Mon, 25 May 2026 10:32:14 +0100 Subject: [PATCH] ReadCollection: fix per-collection write filter typo on removeItem (#15454) self:write({ collection_name = true }) used the literal string "collection_name" as the table key instead of the variable's value. write() consults the table as a per-collection allowlist (updated_collections[coll_name]), so the gate never matched any real collection and the per-collection saveSetting branch was silently skipped -- the in-memory removal didn't reach disk. Stock FM avoids the path (the collection dialog uses addRemoveItemMultiple + full write()), so end-users have not been impacted. Plugins calling removeItem(file, name) directly do hit it. Fixes #15453. --- frontend/readcollection.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/readcollection.lua b/frontend/readcollection.lua index 255d469b0..24068ff40 100644 --- a/frontend/readcollection.lua +++ b/frontend/readcollection.lua @@ -191,7 +191,7 @@ function ReadCollection:removeItem(file, collection_name, no_write) -- FM: delet if self.coll[collection_name][file] then self.coll[collection_name][file] = nil if not no_write then - self:write({ collection_name = true }) + self:write({ [collection_name] = true }) end return true end