Fix for HER-2029 Checkpoints recover error on windows - replace CLibrary.INSTANCE.link() with FilesystemLinkMaker.makeHardLink() in doRecover() - contributed by Andrés Aguilar

This commit is contained in:
Noah Levitt
2013-01-09 18:28:05 -08:00
parent 5af4ff657a
commit d27f67897e
@@ -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);
}
}