mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[diff] IDEA-100386 Detect file type for temporary files built for diff
Otherwise non-binary files without file type associated with them are treated as binary, because file type is not detected for this manually constructed temporary VirtualFiles.
This commit is contained in:
@@ -96,6 +96,9 @@ public class FileContent extends DiffContent {
|
||||
fileContent.setIsEmpty(true);
|
||||
fileContent.myTypeForEmpty = FileTypeManager.getInstance().getFileTypeByFileName(name + "." + ext);
|
||||
}
|
||||
else {
|
||||
FileTypeManager.getInstance().detectFileTypeFromContent(file);
|
||||
}
|
||||
return fileContent;
|
||||
}
|
||||
throw new IOException("Can not create temp file for revision content");
|
||||
|
||||
Reference in New Issue
Block a user