Skip to content

Commit e7e92b3

Browse files
committed
yet more path recognition variant
1 parent d158c3c commit e7e92b3

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

lib/php/libsdk/SDK/Config.php

+11-3
Original file line numberDiff line numberDiff line change
@@ -309,12 +309,20 @@ public static function getDepsLocalPath(bool $reset = false) : ?string
309309
}
310310

311311
if (NULL == self::$depsLocalPath || $reset) {
312-
if (file_exists("../deps")) {
313-
self::setDepsLocalPath(realpath("../deps"));
312+
$tmp = dirname(getcwd()) . DIRECTORY_SEPARATOR . "deps";
313+
if (is_dir($tmp)) {
314+
self::setDepsLocalPath($tmp);
314315
}
315316
}
316-
317+
317318
if (NULL == self::$depsLocalPath || $reset) {
319+
$tmp = realpath("../deps");
320+
if (is_dir($tmp)) {
321+
self::setDepsLocalPath($tmp);
322+
}
323+
}
324+
325+
if (NULL == self::$depsLocalPath) {
318326
if (file_exists("main/php_version.h")) {
319327
/* Deps dir might not exist. */
320328
self::setDepsLocalPath(realpath("..") . DIRECTORY_SEPARATOR . "deps");

0 commit comments

Comments
 (0)