* add \p{Cntrl} characters to filesystem illegal characters pattern

This commit is contained in:
Reinhard Pointner 2016-01-08 13:43:02 +00:00
parent 9949224e2b
commit c5b7f73872
1 changed files with 1 additions and 1 deletions

View File

@ -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