--- gnome-vfs-2.1.6/modules/vfolder-desktop-method.c.hide-with-empty-subfolders 2003-01-13 16:08:37.000000000 -0500 +++ gnome-vfs-2.1.6/modules/vfolder-desktop-method.c 2003-01-13 16:09:21.000000000 -0500 @@ -937,8 +937,19 @@ /* Include subfolders */ /* we always whack them onto the beginning */ if (folder->subfolders != NULL) { - GSList *subfolders = g_slist_copy (folder->subfolders); - g_slist_foreach (subfolders, (GFunc)entry_ref_alloc, NULL); + GSList *li; + GSList *subfolders; + subfolders = NULL; + li = folder->subfolders; + for (li = folder->subfolders; li != NULL; li = li->next) { + Folder *f = li->data; + /* always dont_show_if_empty */ + if (f->entries != NULL) { + entry_ref_alloc (&f->entry); + subfolders = g_slist_prepend (subfolders, f); + } + } + subfolders = g_slist_reverse (subfolders); folder->entries = g_slist_concat (subfolders, folder->entries); } @@ -1079,7 +1090,7 @@ GHashTable *entry_hash; ensure_folder (info, folder, - FALSE /* subfolders */, + TRUE /* subfolders */, NULL /* except */, FALSE /* ignore_unallocated */); if (folder->sorted)