From 67acdb9068e0deba7004e0489ebaf5f82ad45a18 Mon Sep 17 00:00:00 2001 From: James Ahlborn Date: Fri, 21 Mar 2008 17:56:26 +0000 Subject: [PATCH] truncate file before overwriting git-svn-id: https://svn.code.sf.net/p/jackcess/code/jackcess/trunk@291 f203690c-595d-4dc9-a70b-905162fa7fd2 --- src/java/com/healthmarketscience/jackcess/Database.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/java/com/healthmarketscience/jackcess/Database.java b/src/java/com/healthmarketscience/jackcess/Database.java index 123445f..d3485d8 100644 --- a/src/java/com/healthmarketscience/jackcess/Database.java +++ b/src/java/com/healthmarketscience/jackcess/Database.java @@ -302,6 +302,7 @@ public class Database throws IOException { FileChannel channel = openChannel(mdbFile, false); + channel.truncate(0); channel.transferFrom(Channels.newChannel( Thread.currentThread().getContextClassLoader().getResourceAsStream( EMPTY_MDB)), 0, Integer.MAX_VALUE); -- 2.39.5