mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[remote dev] config share: fix sharing config between different frontend processes on macOS (IJPL-192726)
It appears that on macOS only an 'ENTRY_CREATE' event is fired when a new file is created and some content is written to it (on Windows and Linux both 'ENTRY_CREATE' and 'ENTRY_MODIFY' are fired). GitOrigin-RevId: 288b763f1d01c785af5934a3dc27dd4d9d4bda4e
This commit is contained in:
committed by
intellij-monorepo-bot
parent
412e28a0ab
commit
f7d8b0cc88
+15
-13
@@ -76,20 +76,22 @@ internal class SharedConfigFolderNioListener(private val root: Path, private val
|
||||
|
||||
val fileSpec = getSpecFor(eventPath)
|
||||
if (fileSpec != null) {
|
||||
if (kind == StandardWatchEventKinds.ENTRY_DELETE) {
|
||||
if (!configFilesUpdatedByThisProcess.wasDeleted(fileSpec)) {
|
||||
deleted.add(fileSpec)
|
||||
when (kind) {
|
||||
StandardWatchEventKinds.ENTRY_DELETE -> {
|
||||
if (!configFilesUpdatedByThisProcess.wasDeleted(fileSpec)) {
|
||||
deleted.add(fileSpec)
|
||||
}
|
||||
else {
|
||||
LOG.trace { "skipped deleted file $fileName because it was deleted by this process" }
|
||||
}
|
||||
}
|
||||
else {
|
||||
LOG.trace { "skipped deleted file $fileName because it was deleted by this process" }
|
||||
}
|
||||
}
|
||||
else if (kind == StandardWatchEventKinds.ENTRY_MODIFY) {
|
||||
if (!configFilesUpdatedByThisProcess.wasWritten(fileSpec, eventPath)) {
|
||||
modified.add(fileSpec)
|
||||
}
|
||||
else {
|
||||
LOG.trace { "skipped modified file $fileName because it was written by this process" }
|
||||
StandardWatchEventKinds.ENTRY_MODIFY, StandardWatchEventKinds.ENTRY_CREATE -> {
|
||||
if (!configFilesUpdatedByThisProcess.wasWritten(fileSpec, eventPath)) {
|
||||
modified.add(fileSpec)
|
||||
}
|
||||
else {
|
||||
LOG.trace { "skipped modified file $fileName because it was written by this process" }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user