From a131df6d3d4d5236bb3e7aeadebf5754fa147f80 Mon Sep 17 00:00:00 2001 From: Gabriel Tofvesson Date: Fri, 4 Oct 2024 00:43:13 +0200 Subject: [PATCH] Fix cache file name reference --- itemcontroller.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/itemcontroller.lua b/itemcontroller.lua index 111650a..6c0cd12 100644 --- a/itemcontroller.lua +++ b/itemcontroller.lua @@ -6,7 +6,7 @@ local Padding = require("gfx.padding") local CACHE_FILE = ".storage.cache" -local LOCK_FILE = ".storage.lock" +LOCK_FILE = ".storage.lock" local function lock() if fs.exists(LOCK_FILE) then @@ -51,7 +51,7 @@ local function loadState(fname, node) file.close() return Storage:fromSerializable(ser) end - controller = loadState(CACHE_FILE) + controller = loadState(fname) end if controller == nil then @@ -64,7 +64,7 @@ local function loadState(fname, node) end end controller = Storage:fromPeripherals(Storage.assumeHomogeneous(storageChests)) - saveState(controller, CACHE_FILE) + saveState(fname, controller) end return controller end