Skip to content

Commit

Permalink
fixed import problem for image import when destination folder
Browse files Browse the repository at this point in the history
exist
  • Loading branch information
rsehr committed Jun 19, 2012
1 parent 96f939b commit 384475d
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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()));
}
Expand Down

0 comments on commit 384475d

Please sign in to comment.