1
0
mirror of https://github.com/mitb-archive/filebot synced 2024-12-24 16:58:51 -05:00

* 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

View File

@ -456,7 +456,7 @@ public final class FileUtilities {
/**
* 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