diff --git a/datastore_server/source/java/ch/systemsx/cisd/etlserver/plugins/ChainedDataSetMigrationTask.java b/datastore_server/source/java/ch/systemsx/cisd/etlserver/plugins/ChainedDataSetMigrationTask.java index f4b62ecebdbf2f0bc6b62b88d2a8dbefcebbc1b4..0bce20159a0cb4307a674131f61a4ff7947a559f 100644 --- a/datastore_server/source/java/ch/systemsx/cisd/etlserver/plugins/ChainedDataSetMigrationTask.java +++ b/datastore_server/source/java/ch/systemsx/cisd/etlserver/plugins/ChainedDataSetMigrationTask.java @@ -101,9 +101,14 @@ public class ChainedDataSetMigrationTask implements IMaintenanceTask 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); } File dbInstanceDir = files[0];