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

VLSub: Properly handle failure to extract the containing directory

ie. when trying to add subtitle for non local files
parent 7e88d581
......@@ -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>"..
......
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