From 79858e0a197120273f12159d349d253795282dc8 Mon Sep 17 00:00:00 2001 From: "Jay Freeman (saurik)" Date: Mon, 21 Dec 2015 06:31:47 -0800 Subject: [PATCH] Cache crazy dlopen/dladdr library path gymnastics. --- libcycript.cy | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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); } -- 2.49.0