[Ready for Testing] Folder-Syncing
This commit is contained in:
parent
9cd0ef1f04
commit
0b9d6093a0
11 changed files with 1034 additions and 608 deletions
|
@ -84,7 +84,7 @@ public final class ConfigKeeper {
|
|||
changed = true;
|
||||
me.add(myKey.first + myKey.second, otherValue);
|
||||
}
|
||||
else if (otherValue.isJsonPrimitive()) {
|
||||
else if (otherValue.isJsonPrimitive() || otherValue.isJsonArray() || otherValue.isJsonNull()) {
|
||||
if (!otherValue.equals(myValue)) {
|
||||
changed = true;
|
||||
me.add(myKey.first + myKey.second, otherValue);
|
||||
|
@ -93,17 +93,13 @@ public final class ConfigKeeper {
|
|||
else if (otherValue.isJsonObject()) {
|
||||
changed |= compareAndUpdateForSync(myValue.getAsJsonObject(), otherValue.getAsJsonObject());
|
||||
}
|
||||
else if (otherValue.isJsonArray()) {
|
||||
if (!otherValue.equals(myValue)) {
|
||||
changed = true;
|
||||
me.add(myKey.first + myKey.second, otherValue);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
else { //no entry, just copy the value from other
|
||||
changed = true;
|
||||
me.add(otherKey.first + otherKey.second, otherValue);
|
||||
if (!otherValue.isJsonNull()) {
|
||||
changed = true;
|
||||
temp = find(me, otherKey);
|
||||
me.add(otherKey.first + otherKey.second, otherValue);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue