Skip to content

Commit

Permalink
Prevent accepting non-class files in the first place
Browse files Browse the repository at this point in the history
  • Loading branch information
sschr15 committed Aug 31, 2024
1 parent e133e8a commit e99cf6c
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,10 @@ abstract class VineflowerDecompilerBase : ClassFileDecompilers.Full() {
abstract val sourceFileType: FileType

override fun accepts(file: VirtualFile): Boolean {
if (file.extension != "class") {
return false
}

val state = VineflowerState.getInstance()
if (!state.enabled || state.hadError) {
return false
Expand Down

0 comments on commit e99cf6c

Please sign in to comment.