[vlc-commits] lua: fix loading file when the fs always reports mtime = 0
vlc/vlc-3.0 | branch: master | Mathieu Velten | Sat Mar 3 03:04:42 2018 +0100| [22bd6aa4d6680b4894b3140f2a924c39f9de9b5e] | committer: Hugo Beauzée-Luyssen lua: fix loading file when the fs always reports mtime = 0 Signed-off-by: Hugo Beauzée-Luyssen (cherry picked from commit 6b5a14c1e357a245e9e0419ece5355716c1a2fb7) Signed-off-by: Hugo Beauzée-Luyssen > http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=22bd6aa4d6680b4894b3140f2a924c39f9de9b5e --- share/lua/intf/http.lua | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/share/lua/intf/http.lua b/share/lua/intf/http.lua index 1cf8946126..5367ea08c1 100644 --- a/share/lua/intf/http.lua +++ b/share/lua/intf/http.lua @@ -93,9 +93,9 @@ function process(filename) local func = false -- process_raw(filename) return function(...) local new_mtime = vlc.net.stat(filename).modification_time -if new_mtime ~= mtime then +if func == false or new_mtime ~= mtime then -- Re-read the file if it changed -if mtime == 0 then +if func == false then vlc.msg.dbg("Loading `"..filename.."'") else vlc.msg.dbg("Reloading `"..filename.."'") @@ -229,9 +229,9 @@ function rawfile(h,path,url) local page = false -- io.open(filename):read("*a") local callback = function(data,request) local new_mtime = vlc.net.stat(filename).modification_time -if mtime ~= new_mtime then +if page == false or new_mtime ~= mtime then -- Re-read the file if it changed -if mtime == 0 then +if page == false then vlc.msg.dbg("Loading `"..filename.."'") else vlc.msg.dbg("Reloading `"..filename.."'") ___ vlc-commits mailing list vlc-commits@videolan.org https://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] lua: fix loading file when the fs always reports mtime = 0
vlc | branch: master | Mathieu Velten | Sat Mar 3 03:04:42 2018 +0100| [6b5a14c1e357a245e9e0419ece5355716c1a2fb7] | committer: Hugo Beauzée-Luyssen lua: fix loading file when the fs always reports mtime = 0 Signed-off-by: Hugo Beauzée-Luyssen > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=6b5a14c1e357a245e9e0419ece5355716c1a2fb7 --- share/lua/intf/http.lua | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/share/lua/intf/http.lua b/share/lua/intf/http.lua index 1cf8946126..5367ea08c1 100644 --- a/share/lua/intf/http.lua +++ b/share/lua/intf/http.lua @@ -93,9 +93,9 @@ function process(filename) local func = false -- process_raw(filename) return function(...) local new_mtime = vlc.net.stat(filename).modification_time -if new_mtime ~= mtime then +if func == false or new_mtime ~= mtime then -- Re-read the file if it changed -if mtime == 0 then +if func == false then vlc.msg.dbg("Loading `"..filename.."'") else vlc.msg.dbg("Reloading `"..filename.."'") @@ -229,9 +229,9 @@ function rawfile(h,path,url) local page = false -- io.open(filename):read("*a") local callback = function(data,request) local new_mtime = vlc.net.stat(filename).modification_time -if mtime ~= new_mtime then +if page == false or new_mtime ~= mtime then -- Re-read the file if it changed -if mtime == 0 then +if page == false then vlc.msg.dbg("Loading `"..filename.."'") else vlc.msg.dbg("Reloading `"..filename.."'") ___ vlc-commits mailing list vlc-commits@videolan.org https://mailman.videolan.org/listinfo/vlc-commits