<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
******************************<u></u>******************************<u></u>*****************/<br>
+typedef struct directory directory;<br>
+struct directory<br>
 {<br>
-    directory_t *parent;<br>
     DIR         *handle;<br>
     char        *uri;<br>
     char       **filev;<br>
</blockquote>
<br></div></div>
That structure only exists because of recursion. If you remove recursion, you should remove this structure as well.<div class=""><br></div></blockquote><div><br></div><div>I've inlined the data i still need in the access_sys_t.</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="">
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
-#ifdef HAVE_OPENAT<br>
-/* Detect directories that recurse into themselves. */<br>
-static bool has_inode_loop (const directory_t *dir, dev_t dev, ino_t inode)<br>
-{<br>
-    while (dir != NULL)<br>
-    {<br>
-        if ((dir->device == dev) && (dir->inode == inode))<br>
-            return true;<br>
-        dir = dir->parent;<br>
-    }<br>
-    return false;<br>
-}<br>
-#endif<br>
</blockquote>
<br></div>
What will prevent infinite recursion in the playlist after this gets removed?<span class="HOEnZb"><font color="#888888"><br>
<br></font></span></blockquote><div><br></div><div>I've actually no good idea to handle this in a generic way and your light on this issue would be greatly appreciated.</div><div><br></div><div>Felix was in Paris today and he suggested to basically store the file's inode number inside the input item, but it'll only solve the issue for local filesystem. That won't solve the problem for loop in remote folders (ftp, smb, etc.).</div>
<div>J-b, on the other hand, was suggesting that maybe we could limit recursion to a certain configurable depth, the user being still able to unfold the item by playing it.</div><div><br></div><div>What's your opinion on this ?</div>
</div></div></div>