[vlc-commits] VLSub: Handle mkdir errors
Hugo Beauzée-Luyssen
git at videolan.org
Thu Apr 12 11:52:08 CEST 2018
vlc | branch: master | Hugo Beauzée-Luyssen <hugo at beauzee.fr> | Wed Apr 11 12:48:56 2018 +0200| [34bfcde533d82829834ded86c0d23707261e404c] | committer: Hugo Beauzée-Luyssen
VLSub: Handle mkdir errors
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=34bfcde533d82829834ded86c0d23707261e404c
---
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
More information about the vlc-commits
mailing list