[vlc-commits] [Git][videolan/vlc][master] vlcsub: fallback to placeholder target file name

Rémi Denis-Courmont (@Courmisch) gitlab at videolan.org
Sun May 1 19:50:28 UTC 2022



Rémi Denis-Courmont pushed to branch master at VideoLAN / VLC


Commits:
9bdbd49c by Marcin Jakubowski at 2022-05-01T19:18:58+00:00
vlcsub: fallback to placeholder target file name 

fixes #23624, where the determined file name from a remote location
is not a valid file name for saving locally, e.g. from yt
- - - - -


1 changed file:

- share/lua/extensions/VLSub.lua


Changes:

=====================================
share/lua/extensions/VLSub.lua
=====================================
@@ -1543,6 +1543,10 @@ function download_subtitles()
     if not target or not file_touch(target) then
       if openSub.conf.dirPath then
         target =  openSub.conf.dirPath..slash..subfileName
+        -- If the file still can't be written to, use tmp placeholder
+        if not file_touch(target) then
+          target = openSub.conf.dirPath..slash.."vlcsub."..item.SubFormat
+        end
         message = "<br>"..
           warn_tag(lang["mess_save_warn"].."  "..
           "<a href='"..vlc.strings.make_uri(



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

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


VideoLAN code repository instance


More information about the vlc-commits mailing list