1
0
mirror of https://github.com/mitb-archive/filebot synced 2024-12-25 09:18:51 -05:00

* fix excessively long filenames

This commit is contained in:
Reinhard Pointner 2014-06-05 02:48:40 +00:00
parent 796e78a70f
commit 6613ebe67d

View File

@ -479,9 +479,9 @@ public final class FileUtilities {
} }
/** /**
* Invalid file name characters: \, /, :, *, ?, ", <, >, |, \r and \n * Invalid file name characters: \, /, :, *, ?, ", <, >, |, \r, \n and excessive characters
*/ */
public static final Pattern ILLEGAL_CHARACTERS = Pattern.compile("[\\\\/:*?\"<>|\\r\\n]|[ ]+$|(?<=[^.])[.]+$"); public static final Pattern ILLEGAL_CHARACTERS = Pattern.compile("[\\\\/:*?\"<>|\\r\\n]|[ ]+$|(?<=[^.])[.]+$|(?<=.{250})(.+)(?=[.]\\p{Alnum}{3}$)");
/** /**
* Strip file name of invalid characters * Strip file name of invalid characters