Skip to content

Commit 9f2c14d

Browse files
committed
Prevent potentially long stream names
1 parent d86de10 commit 9f2c14d

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

Source/Processors/FileReader/FileReader.cpp

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -357,9 +357,17 @@ void FileReader::updateSettings()
357357
continuousChannels.clear();
358358
eventChannels.clear();
359359

360+
String streamName = input->getRecordName(input->getActiveRecord());
361+
362+
/* Only use the original stream name (FileReader-100.example_data -> example_data) */
363+
StringArray tokens;
364+
tokens.addTokens (input->getRecordName(input->getActiveRecord()), ".");
365+
if ( tokens.size() )
366+
streamName = tokens[tokens.size()-1];
367+
360368
DataStream::Settings streamSettings{
361369

362-
input->getRecordName(input->getActiveRecord()),
370+
streamName,
363371
"A description of the File Reader Stream",
364372
"identifier",
365373
getDefaultSampleRate()

0 commit comments

Comments
 (0)