fix: break out of loop, not switch
This commit is contained in:
@@ -59,7 +59,8 @@ internal class Configuration : IPluginConfiguration {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void Migrate() {
|
public void Migrate() {
|
||||||
while (this.Version < LatestVersion) {
|
var loop = true;
|
||||||
|
while (loop && this.Version < LatestVersion) {
|
||||||
switch (this.Version) {
|
switch (this.Version) {
|
||||||
case 1: {
|
case 1: {
|
||||||
this.Version = 2;
|
this.Version = 2;
|
||||||
@@ -80,6 +81,7 @@ internal class Configuration : IPluginConfiguration {
|
|||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
PluginLog.Warning($"Couldn't migrate config version {this.Version}");
|
PluginLog.Warning($"Couldn't migrate config version {this.Version}");
|
||||||
|
loop = false;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user