From 6a9340f54d642c7f2836d32fb6105ef804ae6b62 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joel=20H=C3=A5kansson?= Date: Wed, 13 Feb 2013 13:00:48 +0000 Subject: [PATCH] Use nio for file copying --- Dotify/src/org/daisy/dotify/system/DuplicatorTask.java | 2 +- Dotify/src/org/daisy/dotify/system/TaskRunner.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Dotify/src/org/daisy/dotify/system/DuplicatorTask.java b/Dotify/src/org/daisy/dotify/system/DuplicatorTask.java index 714eb816..c35250cb 100644 --- a/Dotify/src/org/daisy/dotify/system/DuplicatorTask.java +++ b/Dotify/src/org/daisy/dotify/system/DuplicatorTask.java @@ -28,7 +28,7 @@ public DuplicatorTask(String name, File copy) { @Override public void execute(File input) throws InternalTaskException { try { - FileUtils.copy(input, copy); + FileUtils.copyFile(input, copy); } catch (IOException e) { throw new InternalTaskException("Exception while copying file.", e); } diff --git a/Dotify/src/org/daisy/dotify/system/TaskRunner.java b/Dotify/src/org/daisy/dotify/system/TaskRunner.java index 293a9bf0..159dd321 100644 --- a/Dotify/src/org/daisy/dotify/system/TaskRunner.java +++ b/Dotify/src/org/daisy/dotify/system/TaskRunner.java @@ -108,7 +108,7 @@ private void writeTempFile(File source, String taskSystemName, String taskName, fileName += ".tmp"; File f = new File(tempFilesFolder, fileName); logger.fine("Writing debug file: " + f); - FileUtils.copy(source, f); + FileUtils.copyFile(source, f); } private String truncate(String str, int pos) {