File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed
Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -1107,6 +1107,9 @@ update_dummy_row (NemoListModel *model,
11071107 got_count = nemo_file_get_directory_item_count (file , & count , & unreadable );
11081108
11091109 if ((got_count && count == 0 ) || (!got_count && unreadable )) {
1110+ /* The directory doesn't have any items in it, so we want to
1111+ * hide the the expander. Check if there is any dummy entry
1112+ * (which would force its appearence) and remove it. */
11101113 files = file_entry -> files ;
11111114 if (g_sequence_get_length (files ) == 1 ) {
11121115 GSequenceIter * dummy_ptr = g_sequence_get_iter_at_pos (files , 0 );
@@ -1129,6 +1132,15 @@ update_dummy_row (NemoListModel *model,
11291132 }
11301133 }
11311134 }
1135+ } else if (got_count && count > 0 ) {
1136+ /* The directory does have items in it. We want an expander present,
1137+ * so check if there are any entries, and if not add a dummy one. */
1138+ files = file_entry -> files ;
1139+
1140+ if (g_sequence_get_length (files ) == 0 ) {
1141+ add_dummy_row (model , file_entry );
1142+ changed = TRUE;
1143+ }
11321144 }
11331145
11341146 file_entry -> expanding = FALSE;
You can’t perform that action at this time.
0 commit comments