Fixing issue #353 Forward Slash in site or channel name causes recording error (#448)

* Fixing issue #353
Moved replaceIllegalCharacters method into StringUtils.
Modified classes that write out to disk to call this method when saving a file.

* Implementing suggested changes from comments in PR #448
This commit is contained in:
whelgeson
2018-12-16 18:10:56 -06:00
committed by Denny Sheirer
parent 4a4d1d4b2e
commit 72fe72c833
6 changed files with 27 additions and 28 deletions

View File

@@ -41,6 +41,7 @@ import io.github.dsheirer.source.SourceException;
import io.github.dsheirer.source.SourceManager;
import io.github.dsheirer.source.SourceType;
import io.github.dsheirer.source.config.SourceConfigTuner;
import io.github.dsheirer.util.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -286,7 +287,8 @@ public class ChannelProcessingManager implements ChannelEventListener
channel.getDecodeConfiguration().getDecoderType()));
/* Setup event logging */
List<Module> loggers = mEventLogManager.getLoggers(channel.getEventLogConfiguration(), channel.getName());
String cleanedChannelName = StringUtils.replaceIllegalCharacters(channel.getName());
List<Module> loggers = mEventLogManager.getLoggers(channel.getEventLogConfiguration(), cleanedChannelName);
if(!loggers.isEmpty())
{