mirror of
https://github.com/SquidDev-CC/CC-Tweaked
synced 2025-01-05 23:10:30 +00:00
Don't error when given a malformed URL
Sometimes the pattern fails to match and so the file name ends up being nil.
This commit is contained in:
parent
f74c4cc83c
commit
2dc970a8bb
@ -69,7 +69,7 @@ if run then
|
|||||||
printError(err)
|
printError(err)
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
local sFile = tArgs[1] or getFilename(url)
|
local sFile = tArgs[1] or getFilename(url) or url
|
||||||
local sPath = shell.resolve(sFile)
|
local sPath = shell.resolve(sFile)
|
||||||
if fs.exists(sPath) then
|
if fs.exists(sPath) then
|
||||||
print("File already exists")
|
print("File already exists")
|
||||||
|
Loading…
Reference in New Issue
Block a user