1
0
mirror of https://github.com/LDDestroier/CC/ synced 2024-12-13 03:30:28 +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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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