mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-04 08:51:02 +07:00
[platform] unsolicited use of VFS for deleting storages (IJPL-127)
GitOrigin-RevId: 5309a0c733ca607aac4eb87d693099a91ffb1096
This commit is contained in:
committed by
intellij-monorepo-bot
parent
cd6619cc6b
commit
16b94d11b3
@@ -95,7 +95,7 @@ abstract class FileBasedStorage(
|
|||||||
when {
|
when {
|
||||||
dataWriter == null -> {
|
dataWriter == null -> {
|
||||||
if (useVfs && virtualFile == null) LOG.warn("Cannot find virtual file")
|
if (useVfs && virtualFile == null) LOG.warn("Cannot find virtual file")
|
||||||
deleteFile(storage.file, requestor = this, virtualFile)
|
deleteFile(storage.file, virtualFile = if (useVfs) virtualFile else null, requestor = this)
|
||||||
storage.cachedVirtualFile = null
|
storage.cachedVirtualFile = null
|
||||||
if (events != null && virtualFile != null && virtualFile.isValid) {
|
if (events != null && virtualFile != null && virtualFile.isValid) {
|
||||||
events += VFileDeleteEvent(/*requestor =*/ this, virtualFile)
|
events += VFileDeleteEvent(/*requestor =*/ this, virtualFile)
|
||||||
@@ -121,7 +121,7 @@ abstract class FileBasedStorage(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun deleteFile(file: Path, requestor: StorageManagerFileWriteRequestor, virtualFile: VirtualFile?) {
|
private fun deleteFile(file: Path, virtualFile: VirtualFile?, requestor: StorageManagerFileWriteRequestor) {
|
||||||
if (virtualFile == null) {
|
if (virtualFile == null) {
|
||||||
file.deleteIfExists()
|
file.deleteIfExists()
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user