filesystemmodel: Add a missing check

Paths with depth > 1 should return FALSE instead of pretending the depth
is 1.
This commit is contained in:
Benjamin Otte
2011-10-02 05:27:41 +02:00
parent eb8c2dfae2
commit e97b05acbd

View File

@ -512,6 +512,9 @@ gtk_file_system_model_get_iter (GtkTreeModel *tree_model,
{
g_return_val_if_fail (gtk_tree_path_get_depth (path) > 0, FALSE);
if (gtk_tree_path_get_depth (path) > 1)
return FALSE;
return gtk_file_system_model_iter_nth_child (tree_model,
iter,
NULL,