#231 Expanded empty folder eats space.

Lonely Stranger

For now if you expand directory which have no subdirectories it will still have one fake member "No subdirs". It eats row space in dir tree view. And most of applications show those empty directories just as not expandable. Current behavior should be made optional so could be changed by configuration option between this way and way the most of applications do it.


  • PCMan

    There are no plan to change this. I did this deliberately.
    To make the folders expandable or not expandable on-the-fly is much more expensive then it looks like.
    It requires continuous monitoring of "all of the folders" at the same time.
    As inotify cannot monitor a tree, each node has to be monitored separately.
    This can be very expensive when many folders are expanded and there are many sub folders.
    In systems other than LInux, file monitoring may even be more expansive.
    Some require opening new file descriptors for each monitor.
    So if the user accidentally expand too many sub folders at the same time, we can use up available fds.
    That's why I implement it like this.
    Unless a better way to implement this feature can be found, I don't want to change it.

  • I meant exactly what you said: "a better way". Of course, I want no monitoring of "all of the folders". All monitoring should left as it is. All other is simple. A bit tricky though but it already is used by some programs. I'll explain it.
    1) we expanded a folder which contain some subfolders. OK, we add fake members ("Loading...") into them so they are expandable.
    2) we trying to expand one of them, we see "Loading..." member, folder still has expander.
    3) no subfolders found, we see neither "Loading..." anymore nor expander.
    Of course, we will not see expander later even if external program makes a subdirectory there but it will be discovered as soon we enter into the folder. It's a little cost and very rare situation, we can just document it. And as I already said, I've seen such behavior few times already.
    And I want such behavior to be optional - users that wants see "<No subdirs>" will see them but users who want not will not see. And it's not in 1.0 of course. :)

  • i.e. I meant to change nothing at all, no extra tests or monitorings, just don't show that "<No subdirs>" label. It will work. :)

    • milestone: --> 1.3
    • status: open --> closed-fixed