Commit cdb9c783 authored by Kåre Särs's avatar Kåre Särs

Remove trailing folder separators before invoking ctags (Winows fix)

parent e5d7c600
......@@ -202,8 +202,13 @@ void KateCTagsConfigPage::updateGlobalDB()
}
QString targets;
QString target;
for (int i=0; i<m_confUi.targetList->count(); i++) {
targets += m_confUi.targetList->item(i)->text() + " ";
target = m_confUi.targetList->item(i)->text();
if (target.endsWith('/') || target.endsWith('\\')) {
target = target.left(target.size() - 1);
}
targets += target + " ";
}
QString file = KStandardDirs::locateLocal("appdata", "plugins/katectags/common_db", true);
......
......@@ -512,8 +512,13 @@ void KateCTagsView::updateSessionDB()
}
QString targets;
QString target;
for (int i=0; i<m_ctagsUi.targetList->count(); i++) {
targets += m_ctagsUi.targetList->item(i)->text() + " ";
target = m_ctagsUi.targetList->item(i)->text();
if (target.endsWith('/') || target.endsWith('\\')) {
target = target.left(target.size() - 1);
}
targets += target + " ";
}
if (m_ctagsUi.tagsFile->text().isEmpty()) {
......@@ -528,7 +533,7 @@ void KateCTagsView::updateSessionDB()
return;
}
QString command = QString("%1 -f %2 %3").arg(m_ctagsUi.cmdEdit->text()).arg(m_ctagsUi.tagsFile->text()).arg(targets) ;
QString command = QString("%1 -f %2 %3").arg(m_ctagsUi.cmdEdit->text()).arg(m_ctagsUi.tagsFile->text()).arg(targets);
m_proc.setShellCommand(command);
m_proc.setOutputChannelMode(KProcess::SeparateChannels);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment