Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Fix search that starts at root directory "/" #85

Merged
merged 1 commit into from Oct 3, 2012
Jump to file or symbol
Failed to load files and symbols.
+1 −1
Split
View
@@ -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;