Skip to content

Commit

Permalink
fix: update nes configuration for image storage location - EXO-64344 (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
ahamdi authored Oct 13, 2023
1 parent a61922b commit dac62b0
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -111,10 +111,14 @@ public void processUpgrade(String oldVersion, String newVersion) {
for (Space space : spaceArray) {
String originFolderPath = "/Groups" + space.getGroupId() + originPath;
String destinationFolderPath = "/Groups" + space.getGroupId() + destinationPath;
Item originFolderNode = session.getItem(originFolderPath);
if(originFolderNode != null) {
session.move(originFolderPath, destinationFolderPath);
movedFoldersCount ++;
try {
Item originFolderNode = session.getItem(originFolderPath);
if (originFolderNode != null) {
session.move(originFolderPath, destinationFolderPath);
movedFoldersCount++;
}
} catch(RepositoryException e) {
log.warn("Folder {} to move was not found, ignoring it", originFolderPath, e);
}
// remove unnecessary folders if defined in init params
if(!foldersToRemove.isEmpty()) {
Expand Down
4 changes: 4 additions & 0 deletions data-upgrade-packaging/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,10 @@
<groupId>${project.groupId}</groupId>
<artifactId>data-upgrade-es-reindex</artifactId>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>data-upgrade-move-folders</artifactId>
</dependency>

<!-- Transitive dependencies provided by eXo : set to provided -->
<dependency>
Expand Down
7 changes: 6 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@
<module>data-upgrade-notifications</module>
<module>data-upgrade-processes-permissions</module>
<module>data-upgrade-es-reindex</module>
<module>data-upgrade-packaging</module>
<module>data-upgrade-move-folders</module>
<module>data-upgrade-packaging</module>
</modules>
<properties>
<!-- 3rd party libraries versions -->
Expand Down Expand Up @@ -133,6 +133,11 @@
<artifactId>data-upgrade-es-reindex</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>data-upgrade-move-folders</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>data-upgrade-packaging</artifactId>
Expand Down

0 comments on commit dac62b0

Please sign in to comment.