From 7279fdc25f70025848de1eb0e036e25a83bd76d6 Mon Sep 17 00:00:00 2001 From: Luck Date: Fri, 27 Oct 2017 23:17:57 +0100 Subject: [PATCH] Fix changes not being saved for flatfile bulkupdate operations --- .../luckperms/common/storage/dao/file/ConfigurateDao.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/common/src/main/java/me/lucko/luckperms/common/storage/dao/file/ConfigurateDao.java b/common/src/main/java/me/lucko/luckperms/common/storage/dao/file/ConfigurateDao.java index 4be8442ba..28b5a122c 100644 --- a/common/src/main/java/me/lucko/luckperms/common/storage/dao/file/ConfigurateDao.java +++ b/common/src/main/java/me/lucko/luckperms/common/storage/dao/file/ConfigurateDao.java @@ -323,8 +323,10 @@ public abstract class ConfigurateDao extends AbstractDao { .map(bulkUpdate::apply) .filter(Objects::nonNull) .collect(Collectors.toSet()); + if (!nodes.equals(results)) { writeNodes(object, results); + saveFile(file, object); } } catch (Exception e) { reportException(file.getName(), e); @@ -347,8 +349,10 @@ public abstract class ConfigurateDao extends AbstractDao { .map(bulkUpdate::apply) .filter(Objects::nonNull) .collect(Collectors.toSet()); + if (!nodes.equals(results)) { writeNodes(object, results); + saveFile(file, object); } } catch (Exception e) { reportException(file.getName(), e);