This is an automated email from the ASF dual-hosted git repository.
sergeykamov pushed a commit to branch NLPCRAFT-327
in repository https://gitbox.apache.org/repos/asf/incubator-nlpcraft.git
The following commit(s) were added to refs/heads/NLPCRAFT-327 by this push:
new f795a12 Home folder validation logic fixes.
f795a12 is described below
commit f795a12a867441dbc2be7e48bfefb59ba459436f
Author: Sergey Kamov <[email protected]>
AuthorDate: Tue May 25 10:19:43 2021 +0300
Home folder validation logic fixes.
---
nlpcraft/src/main/scala/org/apache/nlpcraft/common/util/NCUtils.scala | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git
a/nlpcraft/src/main/scala/org/apache/nlpcraft/common/util/NCUtils.scala
b/nlpcraft/src/main/scala/org/apache/nlpcraft/common/util/NCUtils.scala
index fcfbad2..956cbff 100644
--- a/nlpcraft/src/main/scala/org/apache/nlpcraft/common/util/NCUtils.scala
+++ b/nlpcraft/src/main/scala/org/apache/nlpcraft/common/util/NCUtils.scala
@@ -347,7 +347,7 @@ object NCUtils extends LazyLogging {
def ensureHomeDir(): Unit = {
val home = new File(SystemUtils.getUserHome, ".nlpcraft")
- if (!home.exists() && !home.mkdirs())
+ if (home.exists() && home.isFile || !home.exists() && !home.mkdirs())
throw new NCException(s"Failed to create NLPCraft internal
directory: ${home.getAbsolutePath}")
}