Skip to content

Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance

Fixed NullPointerException case on Table init with relative file path.

luccioman6cd3847d0acc
diff --git a/source/net/yacy/kelondro/table/Table.java b/source/net/yacy/kelondro/table/Table.java
index afa753350..a9d811913 100644
--- a/source/net/yacy/kelondro/table/Table.java
+++ b/source/net/yacy/kelondro/table/Table.java
@@ -110,7 +110,9 @@ public class Table implements Index, Iterable<Row.Entry> {
// make new file
freshFile = true;
FileOutputStream fos = null;
- tablefile.getParentFile().mkdirs();
+ if(tablefile.getParentFile() != null) {
+ tablefile.getParentFile().mkdirs();
+ }
try {
fos = new FileOutputStream(tablefile);
} catch (final FileNotFoundException e) {