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 committed by Federico Mena Quintero
parent 55764dddcf
commit 0f4e67df68

View File

@ -513,6 +513,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,