From 5322cd61f258f53b771ca47fda6a06873635719d Mon Sep 17 00:00:00 2001 From: Julien Nioche Date: Thu, 26 Jul 2012 13:57:54 +0100 Subject: [PATCH] Moved version to 1.6.1 and do not try to unzip an archive if it is a directory --- build.properties | 2 +- pom.xml | 2 +- .../java/com/digitalpebble/classification/TextClassifier.java | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/build.properties b/build.properties index b6c9ff1..2877f83 100644 --- a/build.properties +++ b/build.properties @@ -1 +1 @@ -version=1.6-SNAPSHOT +version=1.6.1-SNAPSHOT diff --git a/pom.xml b/pom.xml index f475476..09c92fd 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ com.digitalpebble.textclassification textclassification jar - 1.6 + 1.6.1 TextClassificationAPI Java API for TextClassification https://github.com/jnioche/textclassification diff --git a/src/main/java/com/digitalpebble/classification/TextClassifier.java b/src/main/java/com/digitalpebble/classification/TextClassifier.java index 0f0d422..1a7d832 100644 --- a/src/main/java/com/digitalpebble/classification/TextClassifier.java +++ b/src/main/java/com/digitalpebble/classification/TextClassifier.java @@ -41,7 +41,7 @@ public static TextClassifier getClassifier(String pathResourceDirectory) public static TextClassifier getClassifier(File resourceDirectoryFile) throws Exception { // check whether we need to unzip the resources first - if (resourceDirectoryFile.toString().endsWith(".zip")){ + if (resourceDirectoryFile.toString().endsWith(".zip") && resourceDirectoryFile.isFile()){ resourceDirectoryFile = UnZip.unzip(resourceDirectoryFile); } // check the existence of the path