[trunk] Catch the case where the upgrade is called before the config.yml file exists.

We don't need to update then.

git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1237 e251c2fe-e539-e718-e476-b85c1f46cddb
This commit is contained in:
snowleo 2011-04-16 23:41:11 +00:00
parent 468f646e6e
commit 74c8b634a0

View file

@ -23,6 +23,9 @@ public class EssentialsUpgrade {
private void moveWorthValuesToWorthYml(File dataFolder) {
try {
File configFile = new File(dataFolder, "config.yml");
if (!configFile.exists()) {
return;
}
EssentialsConf conf = new EssentialsConf(configFile);
conf.load();
Worth w = new Worth(dataFolder);