[vlc-commits] VLSub: Properly handle failure to extract the containing directory
Hugo Beauzée-Luyssen
git at videolan.org
Wed Apr 18 16:02:05 CEST 2018
vlc | branch: master | Hugo Beauzée-Luyssen <hugo at beauzee.fr> | Wed Apr 18 16:00:03 2018 +0200| [b492a2b1187aaf2757050e837693540fbd211f9a] | committer: Hugo Beauzée-Luyssen
VLSub: Properly handle failure to extract the containing directory
ie. when trying to add subtitle for non local files
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=b492a2b1187aaf2757050e837693540fbd211f9a
---
share/lua/extensions/VLSub.lua | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/share/lua/extensions/VLSub.lua b/share/lua/extensions/VLSub.lua
index a7bb4d851c..dd916aefb8 100644
--- a/share/lua/extensions/VLSub.lua
+++ b/share/lua/extensions/VLSub.lua
@@ -1509,9 +1509,12 @@ function download_subtitles()
-- Determine if the path to the video file is accessible for writing
- local target = openSub.file.dir..subfileName
+ local target
+ if openSub.file.dir then
+ target = openSub.file.dir..subfileName
+ end
- if not file_touch(target) then
+ if not target or not file_touch(target) then
if openSub.conf.dirPath then
target = openSub.conf.dirPath..slash..subfileName
message = "<br>"..
More information about the vlc-commits
mailing list