mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
avoid OOME on detection of file type from its content (IDEA-182793)
This commit is contained in:
@@ -15,6 +15,7 @@
|
||||
*/
|
||||
package com.intellij.openapi.fileChooser;
|
||||
|
||||
import com.intellij.openapi.fileTypes.FileTypeManager;
|
||||
import com.intellij.openapi.fileTypes.FileTypes;
|
||||
import com.intellij.openapi.util.Comparing;
|
||||
import com.intellij.openapi.util.SystemInfo;
|
||||
@@ -109,7 +110,7 @@ public class FileElement {
|
||||
if (file == null) return false;
|
||||
if (isArchiveFileSystem(file) && file.getParent() == null) return true;
|
||||
return !file.isDirectory() &&
|
||||
file.getFileType() == FileTypes.ARCHIVE &&
|
||||
FileTypeManager.getInstance().getFileTypeByFileName(file.getNameSequence()) == FileTypes.ARCHIVE &&
|
||||
!isArchiveFileSystem(file.getParent());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user