From e7e92b35d0e1fda02cb285f68309469a953916c0 Mon Sep 17 00:00:00 2001 From: Anatol Belski Date: Thu, 17 Aug 2017 16:33:32 +0200 Subject: [PATCH] yet more path recognition variant --- lib/php/libsdk/SDK/Config.php | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/lib/php/libsdk/SDK/Config.php b/lib/php/libsdk/SDK/Config.php index 1d6b816..4cc217a 100644 --- a/lib/php/libsdk/SDK/Config.php +++ b/lib/php/libsdk/SDK/Config.php @@ -309,12 +309,20 @@ class Config } if (NULL == self::$depsLocalPath || $reset) { - if (file_exists("../deps")) { - self::setDepsLocalPath(realpath("../deps")); + $tmp = dirname(getcwd()) . DIRECTORY_SEPARATOR . "deps"; + if (is_dir($tmp)) { + self::setDepsLocalPath($tmp); + } + } + + if (NULL == self::$depsLocalPath || $reset) { + $tmp = realpath("../deps"); + if (is_dir($tmp)) { + self::setDepsLocalPath($tmp); } } - if (NULL == self::$depsLocalPath || $reset) { + if (NULL == self::$depsLocalPath) { if (file_exists("main/php_version.h")) { /* Deps dir might not exist. */ self::setDepsLocalPath(realpath("..") . DIRECTORY_SEPARATOR . "deps");