mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IJPL-189375 do not update VFS record when there are no actual changes
GitOrigin-RevId: 532f67e423562c35152599322bd7d2bf168c0802
This commit is contained in:
committed by
intellij-monorepo-bot
parent
632c56b88d
commit
e882b3d3d2
+3
-6
@@ -912,14 +912,11 @@ public final class PersistentFSImpl extends PersistentFS implements Disposable {
|
||||
else {
|
||||
//just actualise the length:
|
||||
vfsPeer.updateRecordFields(fileId, record -> {
|
||||
record.setLength(content.length);
|
||||
boolean lengthChanged = record.setLength(content.length);
|
||||
int oldFlags = record.getFlags();
|
||||
int flags = oldFlags & ~Flags.MUST_RELOAD_LENGTH;
|
||||
|
||||
if (oldFlags != flags) {
|
||||
record.setFlags(flags);
|
||||
}
|
||||
return true;
|
||||
boolean flagsChanged = record.setFlags(flags);
|
||||
return lengthChanged || flagsChanged;
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user