Only perform flatfile schema migration if the new dir doesn't exist

This commit is contained in:
Luck 2017-04-12 14:28:39 +01:00
parent 71bfdd9bfd
commit 0504e904a2
No known key found for this signature in database
GPG Key ID: EFA9B3EC5FD90F8B

View File

@ -123,7 +123,7 @@ public abstract class FlatfileBacking extends AbstractBacking {
// Perform schema migration // Perform schema migration
File oldData = new File(pluginDir, "data"); File oldData = new File(pluginDir, "data");
if (oldData.exists()) { if (!data.exists() && oldData.exists()) {
plugin.getLog().severe("===== Legacy Schema Migration ====="); plugin.getLog().severe("===== Legacy Schema Migration =====");
plugin.getLog().severe("Starting migration from legacy schema. This could take a while...."); plugin.getLog().severe("Starting migration from legacy schema. This could take a while....");
plugin.getLog().severe("Please do not stop your server while the migration takes place."); plugin.getLog().severe("Please do not stop your server while the migration takes place.");