From d27f67897e638dad03bc91262f0eebf2f7c0d80f Mon Sep 17 00:00:00 2001 From: Noah Levitt Date: Wed, 9 Jan 2013 18:28:05 -0800 Subject: [PATCH] =?UTF-8?q?Fix=20for=20HER-2029=20Checkpoints=20recover=20?= =?UTF-8?q?error=20on=20windows=20-=20replace=20CLibrary.INSTANCE.link()?= =?UTF-8?q?=20with=20FilesystemLinkMaker.makeHardLink()=20in=20doRecover()?= =?UTF-8?q?=20-=20contributed=20by=20Andr=C3=A9s=20Aguilar?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- commons/src/main/java/org/archive/bdb/BdbModule.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/commons/src/main/java/org/archive/bdb/BdbModule.java b/commons/src/main/java/org/archive/bdb/BdbModule.java index 10b0d2ba..1ca6312c 100644 --- a/commons/src/main/java/org/archive/bdb/BdbModule.java +++ b/commons/src/main/java/org/archive/bdb/BdbModule.java @@ -42,7 +42,6 @@ import org.apache.commons.io.filefilter.IOFileFilter; import org.archive.checkpointing.Checkpoint; import org.archive.checkpointing.Checkpointable; import org.archive.spring.ConfigPath; -import org.archive.util.CLibrary; import org.archive.util.FilesystemLinkMaker; import org.archive.util.IdentityCacheable; import org.archive.util.ObjectIdentityBdbManualCache; @@ -526,8 +525,9 @@ public class BdbModule implements Lifecycle, Checkpointable, Closeable, Disposab LOGGER.log(Level.SEVERE, "unable to delete obstructing file "+destFile); } } - int status = CLibrary.INSTANCE.link(cpFile.getAbsolutePath(), destFile.getAbsolutePath()); - if (status!=0) { + + boolean status = FilesystemLinkMaker.makeHardLink(cpFile.getAbsolutePath(), destFile.getAbsolutePath()); + if (!status) { LOGGER.log(Level.SEVERE, "unable to create required restore link "+destFile); } }