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

* disable filename validation against characters not support by Windows via -Dunixfs=true

This commit is contained in:
Reinhard Pointner 2012-04-15 15:38:59 +00:00
parent 7b82fce064
commit 30a2d5153c
2 changed files with 4 additions and 4 deletions

View File

@ -208,8 +208,8 @@ public class CmdlineOperations implements CmdlineInterface {
String newName = (format != null) ? format.format(new MediaBindingBean(episode, file)) : validateFileName(EpisodeFormat.SeasonEpisode.format(episode)); String newName = (format != null) ? format.format(new MediaBindingBean(episode, file)) : validateFileName(EpisodeFormat.SeasonEpisode.format(episode));
File newFile = new File(outputDir, newName + "." + getExtension(file)); File newFile = new File(outputDir, newName + "." + getExtension(file));
if (isInvalidFilePath(newFile)) { if (isInvalidFilePath(newFile) && !Boolean.parseBoolean(System.getProperty("unixfs"))) {
CLILogger.config("Stripping invalid characters from new name: " + newName); CLILogger.config("Stripping invalid characters from new path: " + newName);
newFile = validateFilePath(newFile); newFile = validateFilePath(newFile);
} }
@ -435,7 +435,7 @@ public class CmdlineOperations implements CmdlineInterface {
String newName = (format != null) ? format.format(new MediaBindingBean(movie, file)) : validateFileName(MovieFormat.NameYear.format(movie)); String newName = (format != null) ? format.format(new MediaBindingBean(movie, file)) : validateFileName(MovieFormat.NameYear.format(movie));
File newFile = new File(outputDir, newName + "." + getExtension(file)); File newFile = new File(outputDir, newName + "." + getExtension(file));
if (isInvalidFilePath(newFile)) { if (isInvalidFilePath(newFile) && !Boolean.parseBoolean(System.getProperty("unixfs"))) {
CLILogger.config("Stripping invalid characters from new path: " + newName); CLILogger.config("Stripping invalid characters from new path: " + newName);
newFile = validateFilePath(newFile); newFile = validateFilePath(newFile);
} }

View File

@ -161,7 +161,7 @@ class ValidateDialog extends JDialog {
for (int i = 0; i < source.size(); i++) { for (int i = 0; i < source.size(); i++) {
// invalid file names are also invalid file paths // invalid file names are also invalid file paths
if (isInvalidFilePath(source.get(i))) { if (isInvalidFilePath(source.get(i)) && !Boolean.parseBoolean(System.getProperty("unixfs"))) {
invalidFilePaths.addIndex(i); invalidFilePaths.addIndex(i);
} }
} }