[vlc-commits] [Git][videolan/vlc][master] VLSub: Fix userdata directory creation

Hugo Beauzée-Luyssen (@chouquette) gitlab at videolan.org
Wed Dec 15 13:23:47 UTC 2021



Hugo Beauzée-Luyssen pushed to branch master at VideoLAN / VLC


Commits:
e2538946 by Hugo Beauzée-Luyssen at 2021-12-15T13:01:33+00:00
VLSub: Fix userdata directory creation

Fix #26356

- - - - -


1 changed file:

- share/lua/extensions/VLSub.lua


Changes:

=====================================
share/lua/extensions/VLSub.lua
=====================================
@@ -664,9 +664,14 @@ function check_config()
   local filePath	= slash.."vlsub_conf.xml"
 
   openSub.conf.dirPath = vlc.config.userdatadir()
+  local res,err = vlc.io.mkdir( openSub.conf.dirPath, "0700" )
+  if res ~= 0 and err ~= vlc.errno.EEXIST then
+    vlc.msg.warn("Failed to create " .. openSub.conf.dirPath)
+    return false
+  end
   local subdirs = { "lua", "extensions", "userdata", "vlsub" }
   for _, dir in ipairs(subdirs) do
-    local res, err = vlc.io.mkdir( openSub.conf.dirPath .. slash .. dir, "0700" )
+    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



View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/e25389467299a73bf95d3a3d7d05e93f52eaf1df

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/e25389467299a73bf95d3a3d7d05e93f52eaf1df
You're receiving this email because of your account on code.videolan.org.




More information about the vlc-commits mailing list