Commit 34bfcde5 authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen

VLSub: Handle mkdir errors

parent 4b4b2df3
......@@ -667,7 +667,8 @@ function check_config()
openSub.conf.dirPath = vlc.config.userdatadir()
local subdirs = { "lua", "extensions", "userdata", "vlsub" }
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 )
return false
end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment