diff options
-rw-r--r-- | src/main/java/com/healthmarketscience/jackcess/impl/DatabaseImpl.java | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/main/java/com/healthmarketscience/jackcess/impl/DatabaseImpl.java b/src/main/java/com/healthmarketscience/jackcess/impl/DatabaseImpl.java index 4f3c554..26a7f1b 100644 --- a/src/main/java/com/healthmarketscience/jackcess/impl/DatabaseImpl.java +++ b/src/main/java/com/healthmarketscience/jackcess/impl/DatabaseImpl.java @@ -426,9 +426,13 @@ public class DatabaseImpl implements Database { FileFormatDetails details = getFileFormatDetails(fileFormat); if (details.getFormat().READ_ONLY) { - throw new IOException("file format " + fileFormat + + throw new IOException("File format " + fileFormat + " does not support writing for " + mdbFile); } + if(details.getEmptyFilePath() == null) { + throw new IOException("File format " + fileFormat + + " does not support file creation for " + mdbFile); + } boolean closeChannel = false; if(channel == null) { |