From: James Ahlborn Date: Tue, 6 Dec 2011 02:13:25 +0000 (+0000) Subject: ensure new database is flushed after creation as some users drop the Database returne... X-Git-Tag: jackcess-1.2.6~1 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=9b5c1cac83cd0ecd23cedd6aaaa01b54913008e7;p=jackcess.git 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 --- 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); }