Skip to content

Commit

Permalink
Datastore / Log error in case rename is failing.
Browse files Browse the repository at this point in the history
  • Loading branch information
fxprunayre committed Feb 8, 2024
1 parent 3ff9458 commit d7b3461
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,11 @@ public List<MetadataResource> 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));
}
}
}

Expand Down

0 comments on commit d7b3461

Please sign in to comment.