Skip to content

Commit

Permalink
Merge branch 'release-1.0.3.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
max402 committed Nov 26, 2020
2 parents 89fe24e + 8dd65e5 commit 6c3aeac
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 8 deletions.
2 changes: 1 addition & 1 deletion datasafe-migration-shaded-0.6.1/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>datasafe-migration-root</artifactId>
<groupId>de.adorsys</groupId>
<version>1.0.3.1</version>
<version>1.0.3.2</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion datasafe-migration-shaded-1.0.3/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>datasafe-migration-root</artifactId>
<groupId>de.adorsys</groupId>
<version>1.0.3.1</version>
<version>1.0.3.2</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion datasafe-migration-silent/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>datasafe-migration-root</artifactId>
<groupId>de.adorsys</groupId>
<version>1.0.3.1</version>
<version>1.0.3.2</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ public class MigrationLogic {
private Set<String> migratedUsers = new HashSet<>();

// this file has to exist for every user
private static DocumentFQN MIGRATION_CONFIRMATION = new DocumentFQN("DATASAFE_FORMAT_1_0_3");
private static final DocumentFQN MIGRATION_CONFIRMATION = new DocumentFQN("DATASAFE_FORMAT_1_0_3");
private static final DocumentFQN MIGRATION_CONFIRMATION_1_0_1 = new DocumentFQN("DATASAFE_FORMAT_1_0_1");

private final DistributedLocker distributedLocker;
private final GetStorage.SystemRootAndStorageService oldStorage;
Expand Down Expand Up @@ -123,13 +124,15 @@ public boolean checkMigration(UserIDAuth userIDAuth) {

// before now accessing a lock to work eclusivly, we can check if user is already migrated
if (withIntermediateFolder) {
if (DirectDFSAccess.doesDocumentExistInUsersRootDir(finalStorage, userIDAuth.getUserID(), MIGRATION_CONFIRMATION)) {
if (DirectDFSAccess.doesDocumentExistInUsersRootDir(finalStorage, userIDAuth.getUserID(), MIGRATION_CONFIRMATION_1_0_1) ||
DirectDFSAccess.doesDocumentExistInUsersRootDir(finalStorage, userIDAuth.getUserID(), MIGRATION_CONFIRMATION)) {
log.debug("user {} is already migrated, found version file in finalStorage", username);
migratedUsers.add(username);
return true;
}
} else {
if (DirectDFSAccess.doesDocumentExistInUsersRootDir(newStorage, userIDAuth.getUserID(), MIGRATION_CONFIRMATION)) {
if (DirectDFSAccess.doesDocumentExistInUsersRootDir(newStorage, userIDAuth.getUserID(), MIGRATION_CONFIRMATION_1_0_1) ||
DirectDFSAccess.doesDocumentExistInUsersRootDir(newStorage, userIDAuth.getUserID(), MIGRATION_CONFIRMATION)) {
log.debug("user {} is already migrated, found version file in newStorage", username);
migratedUsers.add(username);
return true;
Expand Down
2 changes: 1 addition & 1 deletion datasafe-migration/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>de.adorsys</groupId>
<artifactId>datasafe-migration-root</artifactId>
<version>1.0.3.1</version>
<version>1.0.3.2</version>
</parent>

<artifactId>datasafe-migration</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>de.adorsys</groupId>
<artifactId>datasafe-migration-root</artifactId>
<version>1.0.3.1</version>
<version>1.0.3.2</version>

<name>datasafe-migration-root</name>
<description>simple datasafe adapter with silent migration under the hood</description>
Expand Down

0 comments on commit 6c3aeac

Please sign in to comment.