summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar Alan Fitton <ajf@eth0.org.uk>2013-02-20 19:46:53 +0000
committerGravatar Alan Fitton <ajf@eth0.org.uk>2013-02-20 19:46:53 +0000
commit69fd839c5d6069ec86bd2e113e980bcb6ca33505 (patch)
tree1c52409378c1344431c911669cba807e69dfc689 /src
parent6feb984156f7e504a00ad8edfef84993ad1b3e74 (diff)
mini-optimization: don't check children hash for files
Diffstat (limited to 'src')
-rw-r--r--src/trg-file-parser.c2
-rw-r--r--src/trg-files-model.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/trg-file-parser.c b/src/trg-file-parser.c
index 03c4f8d..2916615 100644
--- a/src/trg-file-parser.c
+++ b/src/trg-file-parser.c
@@ -70,7 +70,7 @@ static trg_files_tree_node *trg_file_parser_node_insert(trg_files_tree_node
}
}
- if (!target_node && lastIter && lastIter->childrenHash)
+ if (!target_node && lastIter && lastIter->childrenHash && !isFile)
target_node = g_hash_table_lookup(lastIter->childrenHash, path_el_node->val.s);
if (!target_node) {
diff --git a/src/trg-files-model.c b/src/trg-files-model.c
index a0a2a37..bfb1c81 100644
--- a/src/trg-files-model.c
+++ b/src/trg-files-model.c
@@ -192,7 +192,7 @@ static trg_files_tree_node *trg_file_parser_node_insert(trg_files_tree_node
}
}
- if (!target_node && lastIter && lastIter->childrenHash)
+ if (!target_node && lastIter && lastIter->childrenHash && !isFile)
target_node = g_hash_table_lookup(lastIter->childrenHash, path_el);
/* Node needs creating */