Skip to content

Commit

Permalink
fix a bug for data dirs read from /etc/spring/datadir & docu fix
Browse files Browse the repository at this point in the history
was using " " instead of ":" as separator
thanks to jepperc for finding this!
  • Loading branch information
hoijui committed Feb 10, 2010
1 parent c31c388 commit 0451924
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions rts/System/FileSystem/DataDirLocater.cpp
Expand Up @@ -233,12 +233,13 @@ void DataDirLocater::LocateDataDirs()
while (fgets(lineBuf, sizeof(lineBuf), fileH)) {
char* newLineCharPos = strchr(lineBuf, '\n');
if (newLineCharPos) {
// end the string at the it an empty string
// remove the new line char
*newLineCharPos = '\0';
}
// ignore lines consisting of only whitespaces
if ((strlen(lineBuf) > 0) && strspn(lineBuf, whiteSpaces) != strlen(lineBuf)) {
dd_etc = dd_etc + " " + SubstEnvVars(lineBuf);
// append, separated by cPD (depending on OS): ';' or ':'
dd_etc = dd_etc + (dd_etc.empty() ? "" : cPD) + SubstEnvVars(lineBuf);
}
}
fclose(fileH);
Expand Down

0 comments on commit 0451924

Please sign in to comment.