Permalink
Browse files

Mention why this line isn't insane.

  • Loading branch information...
1 parent 94a346e commit e1660133e2dafc7a91d13fc4ce6931f86b2173af @ggreer committed Nov 6, 2012
Showing with 2 additions and 1 deletion.
  1. +2 −1 src/ignore.c
View
@@ -270,9 +270,10 @@ int filename_filter(const char *path, const struct dirent *dir, void *baton) {
}
for (i = 0; base_path[i] == path[i] && i < strlen(base_path); i++) {
+ /* base_path always ends with "/\0" while path doesn't, so this is safe */
path_start = path + i + 2;
}
- log_debug("path is %s", path_start);
+ log_debug("path_start is %s", path_start);
if (path_ignore_search(ig, path_start, filename)) {
return 0;

0 comments on commit e166013

Please sign in to comment.