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:
parent
856351d65b
commit
6b2d6debb0
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user