1
0
mirror of https://github.com/SquidDev-CC/CC-Tweaked synced 2025-04-05 18:26:58 +00:00

Show an error message when editing read-only files

See #1222
This commit is contained in:
Jonathan Coates 2023-05-31 19:32:35 +01:00
parent b09200a270
commit 590ef86c93
No known key found for this signature in database
GPG Key ID: B9E431FF07C98D06

View File

@ -111,7 +111,9 @@ local function set_status(text, ok)
status_text = text
end
if not bReadOnly and fs.getFreeSpace(sPath) < 1024 then
if bReadOnly then
set_status("File is read only", false)
elseif fs.getFreeSpace(sPath) < 1024 then
set_status("Disk is low on space", false)
else
local message