From 384475d9bd513c470be93707657258c45efa74ba Mon Sep 17 00:00:00 2001 From: Robert Sehr Date: Tue, 19 Jun 2012 11:51:01 +0200 Subject: [PATCH] fixed import problem for image import when destination folder exist --- .../src/org/goobi/production/flow/helper/JobCreation.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/goobi1.9/WEB-INF/src/org/goobi/production/flow/helper/JobCreation.java b/goobi1.9/WEB-INF/src/org/goobi/production/flow/helper/JobCreation.java index 082ca0dce..ae9efd8a1 100644 --- a/goobi1.9/WEB-INF/src/org/goobi/production/flow/helper/JobCreation.java +++ b/goobi1.9/WEB-INF/src/org/goobi/production/flow/helper/JobCreation.java @@ -211,7 +211,10 @@ public static void moveFiles(File metsfile, String basepath, Prozess p) throws S File[] imageList = directory.listFiles(); for (File imagedir : imageList) { if (imagedir.isDirectory()) { - FileUtils.moveDirectory(imagedir, new File(p.getImagesDirectory(), imagedir.getName())); + for (File file : imagedir.listFiles()) { + FileUtils.moveFile(file, new File(p.getImagesDirectory() + imagedir.getName(), file.getName())); + } +// FileUtils.moveDirectory(imagedir, new File(p.getImagesDirectory(), imagedir.getName())); } else { FileUtils.moveFile(imagedir, new File(p.getImagesDirectory(), imagedir.getName())); }