File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
patches/src/main/kotlin/app/revanced/util Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -70,8 +70,13 @@ fun ResourcePatchContext.copyResources(
7070 for (resourceGroup in resources) {
7171 resourceGroup.resources.forEach { resource ->
7272 val resourceFile = " ${resourceGroup.resourceDirectoryName} /$resource "
73+ val stream = inputStreamFromBundledResource(sourceResourceDirectory, resourceFile)
74+ if (stream == null ) {
75+ throw IllegalArgumentException (" Could not find resource: $resourceFile " +
76+ " in directory: $sourceResourceDirectory " )
77+ }
7378 Files .copy(
74- inputStreamFromBundledResource(sourceResourceDirectory, resourceFile) !! ,
79+ stream ,
7580 targetResourceDirectory.resolve(resourceFile).toPath(),
7681 StandardCopyOption .REPLACE_EXISTING ,
7782 )
You can’t perform that action at this time.
0 commit comments