Skip to content
Snippets Groups Projects
Commit 9efc8e82 authored by tpylak's avatar tpylak
Browse files

minor fix: migration should not fail when the store is empty

SVN: 16724
parent c02be766
No related branches found
No related tags found
No related merge requests found
...@@ -101,9 +101,14 @@ public class ChainedDataSetMigrationTask implements IMaintenanceTask ...@@ -101,9 +101,14 @@ public class ChainedDataSetMigrationTask implements IMaintenanceTask
return pathname.isDirectory() && UUID_PATTERN.matcher(name).matches(); return pathname.isDirectory() && UUID_PATTERN.matcher(name).matches();
} }
}); });
if (files == null || files.length != 1) if (files == null || files.length == 0)
{ {
throw new EnvironmentFailureException("Exactly one folder with UUID expected in " operationLog.warn("Store is empty, there is nothing to migrate");
return;
}
if (files.length > 1)
{
throw new EnvironmentFailureException("At most one folder with UUID expected in "
+ storeRoot); + storeRoot);
} }
File dbInstanceDir = files[0]; File dbInstanceDir = files[0];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment