Fixed NullPointerException case on Table init with relative file path.

Can occur for example when running dbtest with relative test table file
name (wihout explicit parent folder).
pull/167/head
luccioman 7 years ago
parent 28883d8a71
commit 6cd3847d0a

@ -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) {

Loading…
Cancel
Save