Bug 171021

Summary: doesn't need the + sign in treeview if directory is empty
Product: [Applications] dolphin Reporter: Bimal Rekhadiya <bimaljr>
Component: generalAssignee: Peter Penz <peter.penz19>
Status: RESOLVED FIXED    
Severity: normal CC: audvare, faure, markg85
Priority: NOR    
Version: 16.12.2   
Target Milestone: ---   
Platform: Ubuntu   
OS: Linux   
Latest Commit: Version Fixed In: 4.8.1
Sentry Crash Report:

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
directory.

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...