Skip to content
Browse files

Fix search that starts at root directory "/"

Fix so that the user can do a search starting at the
root directory, e.g. "ag foo /"
  • Loading branch information...
1 parent 8b44fb1 commit 5ad53d7e00768246a5cbac79c586ef70938ad2ef @mmorearty mmorearty committed Oct 3, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/options.c
View
2 src/options.c
@@ -395,7 +395,7 @@ void parse_options(int argc, char **argv, char **paths[]) {
path = strdup(argv[i]);
path_len = strlen(path);
/* kill trailing slash */
- if (path_len > 0 && path[path_len - 1] == '/') {
+ if (path_len > 1 && path[path_len - 1] == '/') {
path[path_len - 1] = '\0';
}
(*paths)[i] = path;

0 comments on commit 5ad53d7

Please sign in to comment.
Something went wrong with that request. Please try again.