Browse Source

Ctags: now excludes node_modules even when run path is empty

merge-requests/389/head
eidheim 7 years ago
parent
commit
6cc4fadd63
  1. 3
      src/ctags.cc

3
src/ctags.cc

@ -11,11 +11,10 @@
std::pair<boost::filesystem::path, std::unique_ptr<std::stringstream>> Ctags::get_result(const boost::filesystem::path &path) { std::pair<boost::filesystem::path, std::unique_ptr<std::stringstream>> Ctags::get_result(const boost::filesystem::path &path) {
auto build = Project::Build::create(path); auto build = Project::Build::create(path);
auto run_path = build->project_path; auto run_path = build->project_path;
std::string exclude; std::string exclude = " --exclude=node_modules";
if(!run_path.empty()) { if(!run_path.empty()) {
exclude += " --exclude=" + filesystem::get_relative_path(build->get_default_path(), run_path).string(); exclude += " --exclude=" + filesystem::get_relative_path(build->get_default_path(), run_path).string();
exclude += " --exclude=" + filesystem::get_relative_path(build->get_debug_path(), run_path).string(); exclude += " --exclude=" + filesystem::get_relative_path(build->get_debug_path(), run_path).string();
exclude += " --exclude=node_modules";
} }
else { else {
boost::system::error_code ec; boost::system::error_code ec;

Loading…
Cancel
Save