mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IJPL-179600 do not mark db file on disk as modified if no data changes
GitOrigin-RevId: 261fd5765377d7fedd661fb8329237e246453d9c
This commit is contained in:
committed by
intellij-monorepo-bot
parent
0e61dfb15c
commit
0b9cd73509
@@ -201,8 +201,15 @@ internal class BazelPersistentMapletFactory private constructor(
|
||||
override fun close() {
|
||||
// during save, we enumerate strings, so we cannot save as a part of close,
|
||||
// as in this case string enumerator maps maybe not saved (as being closed)
|
||||
store.commit()
|
||||
store.close()
|
||||
if (store.hasUnsavedChanges()) {
|
||||
store.commit()
|
||||
store.close()
|
||||
}
|
||||
else {
|
||||
// even if no changes, MvStore update file header -
|
||||
// we want to avoid unnecessary disk writes and file on disk with an updated "modified timestamp"
|
||||
store.closeImmediately()
|
||||
}
|
||||
}
|
||||
|
||||
fun forceClose() {
|
||||
|
||||
Reference in New Issue
Block a user