Skip to content

Commit 9c15915

Browse files
committed
Append a ';' delimiter in !pysymfix when the symbol path is already set.
1 parent 99c39ec commit 9c15915

1 file changed

Lines changed: 12 additions & 1 deletion

File tree

src/pysymfix.cpp

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,16 @@ namespace {
3838
throw runtime_error("SetSymbolPath failed with hr=" + hr);
3939
}
4040

41+
string concatenatePaths(const string& path1, const string& path2, char delim = ';')
42+
{
43+
auto cattedPath = path1;
44+
if (!cattedPath.empty() && cattedPath.back() != delim) {
45+
cattedPath += delim;
46+
}
47+
cattedPath += path2;
48+
return cattedPath;
49+
}
50+
4151
}
4252

4353

@@ -50,7 +60,8 @@ namespace PyExt {
5060

5161
if (sympath.find("pythonsymbols.sdcline.com/symbols") == string::npos) {
5262
Out("Adding symbol server to path...\n");
53-
setSymbolPath(m_Symbols, sympath + "srv*http://pythonsymbols.sdcline.com/symbols");
63+
const auto newPath = concatenatePaths(sympath, "srv*http://pythonsymbols.sdcline.com/symbols");
64+
setSymbolPath(m_Symbols, newPath);
5465
Out("New symbol path: %s\n", getSymbolPath(m_Symbols).c_str());
5566
} else {
5667
Out("Python symbol server already in path.\n");

0 commit comments

Comments
 (0)