* make sure we don't clean up relative paths ../ or ./ by mistake

This commit is contained in:
Reinhard Pointner 2013-09-21 21:18:20 +00:00
parent ae57b4e541
commit e6ce4b63f4
1 changed files with 1 additions and 1 deletions

View File

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