From 6b2d6debb03e3917736f40562a0e9a1377e67c23 Mon Sep 17 00:00:00 2001 From: LDDestroier Date: Thu, 23 May 2019 02:16:51 -0400 Subject: [PATCH] Added read-only check to unpack --- progdor2.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/progdor2.lua b/progdor2.lua index 28e3dd5..d5c5bc6 100644 --- a/progdor2.lua +++ b/progdor2.lua @@ -1094,7 +1094,9 @@ elseif mode == "unpack" then -- unpack OR upload end else -- regular unpack if exists then - if fs.exists(outputPath) and (outputPath ~= inputPath) or outputPath == shell.getRunningProgram() then + if fs.isReadOnly(outputPath) then + error("Output path is read-only.") + elseif fs.exists(outputPath) and (outputPath ~= inputPath) or outputPath == shell.getRunningProgram() then doContinue, doOverwrite = overwriteOutputPath(inputPath, outputPath, true, justOverwrite) end if not doContinue then