Skip to content

Commit

Permalink
Compilation: fix crashing when source file is passed with relative path
Browse files Browse the repository at this point in the history
  • Loading branch information
ChAoSUnItY committed Apr 19, 2022
1 parent 10c5cc9 commit 132c9a4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@
/out/
/local_test/
*.class
*.jar
*.jar
bin/*
2 changes: 1 addition & 1 deletion src/main/kotlin/org/casc/lang/compilation/Compilation.kt
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class Compilation(private val preference: AbstractPreference) {

fun compile() {
var panic = false
val sourceFile = preference.sourceFile!!
val sourceFile = preference.sourceFile!!.absoluteFile!!

measureTime("Compilation") {
if (sourceFile.isDirectory) {
Expand Down

0 comments on commit 132c9a4

Please sign in to comment.