Hi all,<br>So what is the status for the accptance of the patch.<br>As it seems that we don't have a "perfect" solution for the isfile function?<br>- stat  is not part of Lua script for playlist<br>- The proposed isfile by Pierre with popen/pclose shall avoid the deadlocks.<br>
<br>Cheers<br>Nicolas<br><br><div class="gmail_quote">2013/3/8 Pierre Villard <span dir="ltr"><<a href="mailto:pierre.villard.fr@gmail.com" target="_blank">pierre.villard.fr@gmail.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

  
    
  
  <div bgcolor="#FFFFFF" text="#000000"><div class="im">
    <div>On 07/03/2013 16:36, Ilkka Ollakka
      wrote:<br>
    </div>
    <blockquote type="cite">
      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.</blockquote></div>
    Not sure there is such a function in Lua about directory (except if
    we make an assumption about the file system) :<br>
<a href="http://stackoverflow.com/questions/1340230/check-if-directory-exists-in-lua" target="_blank">http://stackoverflow.com/questions/1340230/check-if-directory-exists-in-lua</a><br>
    The last post on the previous web page seems weird to me.<br>
    Having said that, maybe I didn't get your point.<br>
    <br>
    About <i>is_file()</i>, Rémi Denis-Courmont noticed to me it could
    raise some issues.<br>
    <blockquote>
      <pre>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.</pre>
    </blockquote><div class="im">
    <br>
    <blockquote type="cite">
      <pre>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.
</pre>
    </blockquote></div>
    Yes you're right, I misread the README in playlist directory about
    vlc.access... >.<<br>
    New patch enclosed.<br>
  </div>

<br>_______________________________________________<br>
vlc-devel mailing list<br>
To unsubscribe or modify your subscription options:<br>
<a href="http://mailman.videolan.org/listinfo/vlc-devel" target="_blank">http://mailman.videolan.org/listinfo/vlc-devel</a><br>
<br></blockquote></div><br>