diff --git a/core/src/main/java/org/fao/geonet/api/records/attachments/FilesystemStore.java b/core/src/main/java/org/fao/geonet/api/records/attachments/FilesystemStore.java index 76cac474445..f324552aeb2 100644 --- a/core/src/main/java/org/fao/geonet/api/records/attachments/FilesystemStore.java +++ b/core/src/main/java/org/fao/geonet/api/records/attachments/FilesystemStore.java @@ -335,7 +335,11 @@ public List getResources(ServiceContext context, String metada @Override public void renameFolder(Path originalPath, Path newPath) { if (Files.exists(originalPath)) { - originalPath.toFile().renameTo(newPath.toFile()); + boolean succeed = originalPath.toFile().renameTo(newPath.toFile()); + if (!succeed) { + Log.error(Geonet.RESOURCES, + String.format("Datastore issue. Failed to rename %s in %s", originalPath, newPath)); + } } }