* make sure the user.home is never considered a movie folder

This commit is contained in:
Reinhard Pointner 2013-04-30 11:20:28 +00:00
parent 7cf2177f79
commit 86723cb3bf
2 changed files with 13 additions and 0 deletions

View File

@ -632,6 +632,18 @@ public class MediaDetection {
public static File guessMovieFolder(File movieFile) throws Exception { public static File guessMovieFolder(File movieFile) throws Exception {
File folder = guessMovieFolderWithoutSanity(movieFile);
// perform sanity checks
if (folder == null || folder.equals(new File(System.getProperty("user.home")))) {
return null;
}
return folder;
}
private static File guessMovieFolderWithoutSanity(File movieFile) throws Exception {
// special case for folder mode // special case for folder mode
if (movieFile.isDirectory()) { if (movieFile.isDirectory()) {
File f = movieFile; File f = movieFile;

View File

@ -112,6 +112,7 @@ DDLValley
DDLValley.eu DDLValley.eu
ded ded
Demonoid Demonoid
Descargas
Director's.Cut Director's.Cut
Directors.Cut Directors.Cut
DKsubs DKsubs