I somehow miss in your code a test whether a path represents a directory or a plain file (or a symlink to a directory or to a file etc.).
In reply to Re: sorting tree with folders on top
by rovf
in thread sorting tree with folders on top
by diweooy
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |