handles file names with as many "." as the users likes correctly
This commit is contained in:
parent
4f3697a9b5
commit
f23694fa89
@ -260,9 +260,13 @@ int PMsrHandler::WriteMsrLogFile()
|
|||||||
tokens = fFileName.Tokenize(".");
|
tokens = fFileName.Tokenize(".");
|
||||||
if (!tokens)
|
if (!tokens)
|
||||||
return PMUSR_TOKENIZE_ERROR;
|
return PMUSR_TOKENIZE_ERROR;
|
||||||
ostr = dynamic_cast<TObjString*>(tokens->At(0));
|
// in order to handle names with "." correctly this slightly odd mlog-filename generation
|
||||||
str = ostr->GetString();
|
str = TString("");
|
||||||
str += ".mlog";
|
for (int i=0; i<tokens->GetEntries()-1; i++) {
|
||||||
|
ostr = dynamic_cast<TObjString*>(tokens->At(i));
|
||||||
|
str += ostr->GetString() + TString(".");
|
||||||
|
}
|
||||||
|
str += "mlog";
|
||||||
|
|
||||||
// clean up
|
// clean up
|
||||||
if (tokens) {
|
if (tokens) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user