]> git.saurik.com Git - cycript.git/commitdiff
Cache crazy dlopen/dladdr library path gymnastics.
authorJay Freeman (saurik) <saurik@saurik.com>
Mon, 21 Dec 2015 14:31:47 +0000 (06:31 -0800)
committerJay Freeman (saurik) <saurik@saurik.com>
Mon, 21 Dec 2015 14:31:47 +0000 (06:31 -0800)
libcycript.cy

index 98533642f0941243363ac10946c191d0ea57862a..7c279cb619d12da6a8d7c61f3aea5e772764ac5f 100644 (file)
@@ -101,7 +101,13 @@ let GetLibraryPath = function() {
         if (slash == -1)
             return null;
 
-        return path.substr(0, slash);
+        path = path.substr(0, slash);
+
+        GetLibraryPath = function() {
+            return path;
+        };
+
+        return GetLibraryPath();
     } finally {
         dlclose(handle);
     }