From 903f8eaa91c3ffee225c2fd77b3edfb06e99eb44 Mon Sep 17 00:00:00 2001 From: Matt Jenkins Date: Sat, 8 Feb 2020 20:01:31 +0000 Subject: [PATCH] Don't copy sentence files if moving within book --- src/uk/co/majenko/audiobookrecorder/AudiobookRecorder.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/uk/co/majenko/audiobookrecorder/AudiobookRecorder.java b/src/uk/co/majenko/audiobookrecorder/AudiobookRecorder.java index a3b9e0f..88d9793 100644 --- a/src/uk/co/majenko/audiobookrecorder/AudiobookRecorder.java +++ b/src/uk/co/majenko/audiobookrecorder/AudiobookRecorder.java @@ -2891,7 +2891,9 @@ public class AudiobookRecorder extends JFrame implements DocumentListener { to.add(snt); snt.setParentBook(to.getBook()); File destination = snt.getFile(); - Files.copy(source.toPath(), destination.toPath()); + if (from.getBook() != to.getBook()) { + Files.copy(source.toPath(), destination.toPath()); + } } catch (Exception ex) { ex.printStackTrace(); }