Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Fix mock-relative issues due to lack of permissions
  • Loading branch information
Markoutte committed Aug 22, 2022
commit 8e27750cc4676408f593dcd04b141f62aeb2ea22
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,9 @@ internal fun <T> sandbox(block: () -> T): T {

internal fun <T> sandbox(file: URI, block: () -> T): T {
val path = Paths.get(file)
val perms = mutableListOf<Permission>()
val perms = mutableListOf<Permission>(
RuntimePermission("accessDeclaredMembers")
)
val allCodeSource = CodeSource(null, emptyArray<Certificate>())
if (Files.exists(path)) {
val policyFile = PolicyFile(file.toURL())
Expand Down