Skip to content

Commit 46dd3d6

Browse files
committed
try to fix filename bug on windows
1 parent 893a89f commit 46dd3d6

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/test/kotlin/assimp/anchor.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import io.kotlintest.*
44
import org.lwjgl.BufferUtils
55
import java.io.*
66
import java.net.URL
7+
import java.nio.file.Paths
78

89
/**
910
* Created by elect on 14/01/2017.
@@ -30,7 +31,7 @@ fun getResource(resource: String): URL = ClassLoader.getSystemResource(resource)
3031
* @return the result of [Importer.readFile]
3132
*/
3233
fun Importer.testFile(path: URL, flags: AiPostProcessStepsFlags = 0, failOnNull: Boolean = true, verify: AiScene.() -> Unit = {}): AiScene? {
33-
return testFile(path.file, flags, failOnNull, verify)
34+
return testFile(Paths.get(path.toURI()).toAbsolutePath().toString(), flags, failOnNull, verify)
3435
}
3536

3637
/**

0 commit comments

Comments
 (0)