[vlc-devel] [PATCH 3/3] VLSub: Handle mkdir errors
Hugo Beauzée-Luyssen
hugo at beauzee.fr
Wed Apr 11 12:59:50 CEST 2018
---
share/lua/extensions/VLSub.lua | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/share/lua/extensions/VLSub.lua b/share/lua/extensions/VLSub.lua
index 0306cc1d62..4539869839 100644
--- a/share/lua/extensions/VLSub.lua
+++ b/share/lua/extensions/VLSub.lua
@@ -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
--
2.11.0
More information about the vlc-devel
mailing list