From ac007c56c9777d850f9796fd8d0ae22023ed52ef Mon Sep 17 00:00:00 2001 From: meowtech Date: Tue, 26 May 2026 23:08:07 +0000 Subject: [PATCH] uhhhh, forgot to specify explict binary reading and writing for sunshine settings save file --- scripts/Settings.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/scripts/Settings.rb b/scripts/Settings.rb index fe1caa2..da90c4a 100644 --- a/scripts/Settings.rb +++ b/scripts/Settings.rb @@ -33,7 +33,7 @@ module Settings Settings.reset! if FileTest.exist?(Settings::FILE_PATH) - File.open(Settings::FILE_PATH, "r") do |f| + File.open(Settings::FILE_PATH, "rb") do |f| settings = Marshal.load(f) rescue return if settings.class == Hash settings.each do |key, value| @@ -50,7 +50,9 @@ module Settings Settings::Legacy.save! if @data - File.write(Settings::FILE_PATH, Marshal.dump(@data)) + File.open(Settings::FILE_PATH, "wb") do |f| + f.write Marshal.dump(@data) + end end end