1
0
mirror of https://github.com/LDDestroier/CC/ synced 2025-09-29 08:04:05 +00:00

Added read-only check to unpack

This commit is contained in:
LDDestroier
2019-05-23 02:16:51 -04:00
committed by GitHub
parent 856351d65b
commit 6b2d6debb0

View File

@@ -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