From: Jay Freeman (saurik) Date: Mon, 21 Dec 2015 14:31:47 +0000 (-0800) Subject: Cache crazy dlopen/dladdr library path gymnastics. X-Git-Tag: v0.9.590~160 X-Git-Url: https://git.saurik.com/cycript.git/commitdiff_plain/79858e0a197120273f12159d349d253795282dc8?hp=bf998c10baabbd95f2d59d29f9edea0eb107b156 Cache crazy dlopen/dladdr library path gymnastics. --- diff --git a/libcycript.cy b/libcycript.cy index 9853364..7c279cb 100644 --- a/libcycript.cy +++ b/libcycript.cy @@ -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); }