File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -49,7 +49,7 @@ final class RuntimeListings: ObservableObject {
4949 }
5050
5151 func isImageLoaded( path: String ) -> Bool {
52- imageList. contains ( CDUtilities . patchImagePathForDYLD ( path) )
52+ imageList. contains ( CDUtilities . patchImagePathForDyld ( path) )
5353 }
5454}
5555
@@ -75,7 +75,7 @@ extension CDUtilities {
7575 }
7676
7777 class func classNamesIn( image: String ) -> [ String ] {
78- patchImagePathForDYLD ( image) . withCString ( encodedAs : Unicode . UTF8 . self ) { cString in
78+ patchImagePathForDyld ( image) . withCString { cString in
7979 var classCount : UInt32 = 0
8080 guard let classNames = objc_copyClassNamesForImage ( cString, & classCount) else { return [ ] }
8181
@@ -91,7 +91,8 @@ extension CDUtilities {
9191}
9292
9393extension CDUtilities {
94- class func patchImagePathForDYLD( _ imagePath: String ) -> String {
94+ class func patchImagePathForDyld( _ imagePath: String ) -> String {
95+ guard imagePath. starts ( with: " / " ) else { return imagePath }
9596 let rootPath = ProcessInfo . processInfo. environment [ " DYLD_ROOT_PATH " ]
9697 guard let rootPath else { return imagePath }
9798 return rootPath. appending ( imagePath)
You can’t perform that action at this time.
0 commit comments