[vlc-devel] [PATCH] lua: fix loading file when the fs always reports mtime = 0
Hugo Beauzée-Luyssen
hugo at beauzee.fr
Mon Apr 16 10:20:21 CEST 2018
On Sat, Mar 3, 2018, at 4:07 AM, Mathieu Velten wrote:
> Ok so I tried to change the subject with git send-mail but failed.
>
> The last patch is an alternate version that would also fix my problem.
>
> Le sam. 3 mars 2018 à 03:04, Mathieu Velten <matmaul at gmail.com> a écrit :
>
> > ---
> > 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.."'")
> > --
> > 2.14.3
> >
> >
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel
Applied (with a "slight" delay, sorry about that)
Thanks!
--
Hugo Beauzée-Luyssen
hugo at beauzee.fr
More information about the vlc-devel
mailing list