[vlc-devel] [PATCH] LUA script to read DCP

Nicolas Bertrand nicoinattendu at gmail.com
Wed Mar 13 12:09:36 CET 2013

Hi all,
So what is the status for the accptance of the patch.
As it seems that we don't have a "perfect" solution for the isfile function?
- stat  is not part of Lua script for playlist
- The proposed isfile by Pierre with popen/pclose shall avoid the deadlocks.


2013/3/8 Pierre Villard <pierre.villard.fr at gmail.com>

>  On 07/03/2013 16:36, Ilkka Ollakka wrote:
> Hi, I noticed that you use is_file() call in that script. But you could
> just try is_dir() call to path to know directly if it's directory name and
> exists in probe(). I don't really know the underlying implementation of
> that is_dir() (just spotted it from short googling) function and no idea if
> it does something unwanted.
> Not sure there is such a function in Lua about directory (except if we
> make an assumption about the file system) :
> http://stackoverflow.com/questions/1340230/check-if-directory-exists-in-lua
> The last post on the previous web page seems weird to me.
> Having said that, maybe I didn't get your point.
> About *is_file()*, Rémi Denis-Courmont noticed to me it could raise some
> issues.
> stat() MUST be used to check if a file exists and the file type MUST be
> checked. open()-then-close() is inefficient and prone to deadlock.
>  for example something like this
> ---
> locale working_accesses = {file="true",directory="true"}
> if( working_accesses[vlc.access] == nil ) then
>     return false
> end
> ---
> Basicly return if access isn't in that table.
>  Yes you're right, I misread the README in playlist directory about
> vlc.access... >.<
> New patch enclosed.
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> http://mailman.videolan.org/listinfo/vlc-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20130313/656e71c2/attachment.html>

More information about the vlc-devel mailing list