From 2c073937c316bd7b14f4b6696521fc20c74bcf3a Mon Sep 17 00:00:00 2001 From: elasota Date: Thu, 12 Nov 2020 19:13:22 -0500 Subject: [PATCH] Fix houses not being read-only in itch.io release --- GpApp/HouseIO.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/GpApp/HouseIO.cpp b/GpApp/HouseIO.cpp index 41fb33a..9af46a2 100644 --- a/GpApp/HouseIO.cpp +++ b/GpApp/HouseIO.cpp @@ -854,6 +854,10 @@ void YellowAlert (short whichAlert, short identifier) Boolean IsFileReadOnly (const VFileSpec &spec) { + // Kind of annoying, but itch.io doesn't preserve read-only flags and there doesn't seem to be any way around that. + if (spec.m_dir == PortabilityLayer::VirtualDirectories::kApplicationData || spec.m_dir == PortabilityLayer::VirtualDirectories::kGameData) + return true; + return PortabilityLayer::FileManager::GetInstance()->FileLocked(spec.m_dir, spec.m_name); }