Bug 171021 - doesn't need the + sign in treeview if directory is empty
Summary: doesn't need the + sign in treeview if directory is empty
Alias: None
Product: dolphin
Classification: Applications
Component: general (show other bugs)
Version: 16.12.2
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Peter Penz
Depends on:
Reported: 2008-09-14 10:09 UTC by Bimal Rekhadiya
Modified: 2012-02-03 09:03 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In: 4.8.1


Note You need to log in before you can comment on or make changes to this bug.
Description Bimal Rekhadiya 2008-09-14 10:09:10 UTC
Version:            (using KDE 4.1.1)
Compiler:          Dolphin Version 1.1 - Using KDE 4.1.1 (KDE 4.1.1) 
OS:                Linux
Installed from:    Ubuntu Packages

I have enabled the TreeView in Dolphin 1.1 (for KDE 4.1)

But it displays + sign for empty directory too. I would be no sign for empty directory.

Thank you
Comment 1 Andrew Udvare 2009-10-22 04:12:52 UTC
I think this may be a problem with ntfs-3g, and maybe other file systems like
vfat. The other issue is that in the directory tree EVERY folder on an ntfs-3g
partition has a + expansion button even if no directories are inside that level

I can confirm that this problem does not occur with ext3. Only my ntfs-3g
partition does this where I have to refresh a lot and the aforementioned
problem above.
Comment 2 David Faure 2010-05-20 23:25:39 UTC
Nope, happens here on ext3 too. We're talking about the dolphin directory tree, not about the konqueror directory tree (which indeed uses the number of links to the directory inode, iirc, so that code is pretty specific to real unix filesystems).

Maybe we could use KDirModel::ChildCountRole for this... not sure if this should be done in KDirModel or dolphin's filter though. Probably the latter, since kdirmodel can't know that only subdirs are shown.
Comment 3 Mark 2010-09-19 03:27:02 UTC
Confirmed for 4.5.1 and trunk as well.
Empty folders have a nice "expand" sign in front of them.

Any suggestions on fixing this?
Remember, an empty folder doesn't need to be empty.. for example it can have hidden files and that folder should show as empty when "show hidden files" is disabled...