From 4e70d6397885d607cc0f6491855e344a49c44f1f Mon Sep 17 00:00:00 2001 From: tonyjamesstark Date: Fri, 2 Oct 2026 12:58:17 -0700 Subject: [PATCH] Fixed SQLite purges with world and block filters purging other tables (#1025) On SQLite, /co purge r:#world i: built the retain condition for world-scoped tables without checking the block restriction, so it purged co_container, co_chat and the other world-scoped tables in that world although a block restriction should leave them untouched. The entity_container/entity_interaction branch and the MySQL path already check it. Claude-Session: https://claude.ai/code/session_01PdEuKbjcVoVinVQJq4te1f Co-authored-by: Claude --- src/main/java/net/coreprotect/command/PurgeCommand.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/net/coreprotect/command/PurgeCommand.java b/src/main/java/net/coreprotect/command/PurgeCommand.java index 40a8cdcb..53befa4c 100755 --- a/src/main/java/net/coreprotect/command/PurgeCommand.java +++ b/src/main/java/net/coreprotect/command/PurgeCommand.java @@ -513,7 +513,7 @@ public class PurgeCommand extends Consumer { timeLimit = " WHERE (" + worldMatch + " AND (time >= '" + timeEnd + "' OR time < '" + timeStart + "')) OR NOT " + worldMatch; } } - else { + else if (purge) { timeLimit = " WHERE (" + blockRestriction + "wid = '" + argWid + "' AND (time >= '" + timeEnd + "' OR time < '" + timeStart + "'))) OR (wid != '" + argWid + "')"; } }