mirror of https://code.videolan.org/videolan/vlc
VLSub: Handle mkdir errors
This commit is contained in:
parent
4b4b2df3df
commit
34bfcde533
|
@ -667,7 +667,8 @@ function check_config()
|
||||||
openSub.conf.dirPath = vlc.config.userdatadir()
|
openSub.conf.dirPath = vlc.config.userdatadir()
|
||||||
local subdirs = { "lua", "extensions", "userdata", "vlsub" }
|
local subdirs = { "lua", "extensions", "userdata", "vlsub" }
|
||||||
for _, dir in ipairs(subdirs) do
|
for _, dir in ipairs(subdirs) do
|
||||||
if not vlc.io.mkdir( openSub.conf.dirPath .. slash .. dir, "0700" ) then
|
local res, err = vlc.io.mkdir( openSub.conf.dirPath .. slash .. dir, "0700" )
|
||||||
|
if res ~= 0 and err ~= vlc.errno.EEXIST then
|
||||||
vlc.msg.warn("Failed to create " .. openSub.conf.dirPath .. slash .. dir )
|
vlc.msg.warn("Failed to create " .. openSub.conf.dirPath .. slash .. dir )
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue