From c5b7f738728161b71abb33ffcce59f30f45fd829 Mon Sep 17 00:00:00 2001 From: Reinhard Pointner Date: Fri, 8 Jan 2016 13:43:02 +0000 Subject: [PATCH] * add \p{Cntrl} characters to filesystem illegal characters pattern --- source/net/filebot/util/FileUtilities.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/net/filebot/util/FileUtilities.java b/source/net/filebot/util/FileUtilities.java index 14604018..2beeb686 100644 --- a/source/net/filebot/util/FileUtilities.java +++ b/source/net/filebot/util/FileUtilities.java @@ -565,7 +565,7 @@ public final class FileUtilities { /** * Invalid file name characters: \, /, :, *, ?, ", <, >, |, \r, \n and excessive characters */ - public static final Pattern ILLEGAL_CHARACTERS = Pattern.compile("[\\\\/:*?\"<>|\\r\\n]|[ ]+$|(?<=[^.])[.]+$|(?<=.{250})(.+)(?=[.]\\p{Alnum}{3}$)"); + public static final Pattern ILLEGAL_CHARACTERS = Pattern.compile("[\\\\/:*?\"<>|\\r\\n]|\\p{Cntrl}|[ ]+$|(?<=[^.])[.]+$|(?<=.{250})(.+)(?=[.]\\p{Alnum}{3}$)"); /** * Strip file name of invalid characters