summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJames Ahlborn <jtahlborn@yahoo.com>2011-12-06 02:13:25 +0000
committerJames Ahlborn <jtahlborn@yahoo.com>2011-12-06 02:13:25 +0000
commit9b5c1cac83cd0ecd23cedd6aaaa01b54913008e7 (patch)
tree2bdd6899f93234fb0e8472c85f1ddc2bbc3f9aaf /src
parentf646e75d5b90647d9b2c65b938dc3adf84ddae02 (diff)
downloadjackcess-9b5c1cac83cd0ecd23cedd6aaaa01b54913008e7.tar.gz
jackcess-9b5c1cac83cd0ecd23cedd6aaaa01b54913008e7.zip
ensure new database is flushed after creation as some users drop the Database returned from create()
git-svn-id: https://svn.code.sf.net/p/jackcess/code/jackcess/trunk@601 f203690c-595d-4dc9-a70b-905162fa7fd2
Diffstat (limited to 'src')
-rw-r--r--src/java/com/healthmarketscience/jackcess/Database.java1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/java/com/healthmarketscience/jackcess/Database.java b/src/java/com/healthmarketscience/jackcess/Database.java
index 4f2f753..5b5e9d5 100644
--- a/src/java/com/healthmarketscience/jackcess/Database.java
+++ b/src/java/com/healthmarketscience/jackcess/Database.java
@@ -697,6 +697,7 @@ public class Database
FileChannel channel = openChannel(mdbFile, false);
channel.truncate(0);
transferFrom(channel, getResourceAsStream(fileFormat._emptyFile));
+ channel.force(true);
return new Database(channel, autoSync, fileFormat, charset, timeZone,
null);
}