mirror of
https://forgejo.xatacraft.ru/Sunshine/mkxp-sunshine.git
synced 2026-08-19 13:29:54 +00:00
uhhhh, forgot to specify explict binary reading and writing for sunshine settings save file
This commit is contained in:
parent
db64eb7f0f
commit
ac007c56c9
1 changed files with 4 additions and 2 deletions
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue