File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change 233
233
234
234
const FileInputStream = Java . use ( "java.io.FileInputStream" ) ;
235
235
FileInputStream . $init . overload ( 'java.io.File' ) . implementation = function ( file ) {
236
- const filename = file . getAbsolutePath ( ) ;
237
- if ( ROOT_INDICATORS . paths . has ( filename ) || filename . includes ( "magisk" ) || filename . includes ( "su" ) ) {
236
+ const path = file . getAbsolutePath ( ) ;
237
+ const filename = file . getName ( ) ;
238
+ if ( ROOT_INDICATORS . paths . has ( path ) || path . includes ( "magisk" ) || filename . includes ( "su" ) ) {
238
239
if ( DEBUG_MODE ) {
239
- console . debug ( `Blocked possible root detection: file stream for ${ filename } ` ) ;
240
+ console . debug ( `Blocked possible root detection: file stream for ${ path } ` ) ;
240
241
} else logFirstRootDetection ( ) ;
241
- throw new Java . use ( "java.io.FileNotFoundException" ) . $new ( filename ) ;
242
+ throw Java . use ( "java.io.FileNotFoundException" ) . $new ( path ) ;
242
243
}
243
244
return this . $init ( file ) ;
244
245
} ;
You can’t perform that action at this time.
0 commit comments