From 31106f2b13a2ef7d114697cf8f4f1a5936ae1f24 Mon Sep 17 00:00:00 2001 From: dami Date: Mon, 6 Jul 2026 19:03:27 +0800 Subject: [PATCH] Update webstats_common.lua --- plugins/webstats/lua/webstats_common.lua | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/plugins/webstats/lua/webstats_common.lua b/plugins/webstats/lua/webstats_common.lua index ac70163b8..3a4bbfa08 100644 --- a/plugins/webstats/lua/webstats_common.lua +++ b/plugins/webstats/lua/webstats_common.lua @@ -961,10 +961,16 @@ function _M.D(self,msg) end function _M.is_migrating(self, input_sn) - local file = io.open(self.app_dir.."/migrating", "rb") - if file then return true end - local file = io.open(self.app_dir.."/logs/"..input_sn.."/migrating", "rb") - if file then return true end + local fp = io.open(self.app_dir.."/migrating", "rb") + if fp then + fp:close() + return true + end + local fp = io.open(self.app_dir.."/logs/"..input_sn.."/migrating", "rb") + if fp then + fp:close() + return true + end return false end