Fixed emulator fails to load lib*GL when launched from its own directory
When emulator is lunched from its own directory (ie. cd out/*/bin; ./emulator),
emulator fails to locate shared libraries lib*GL at out/*/lib because utility
function path_parent(".", 1) incorrectly returns NULL instead of "..".
Fixed that case.
Change-Id: I86f8e5d655107ae8cd2237d59518180ce6e69c53
diff --git a/android/utils/path.c b/android/utils/path.c
index 1bcdc4e..3e9d97b 100644
--- a/android/utils/path.c
+++ b/android/utils/path.c
@@ -78,8 +78,12 @@
while (base > path && !ispathsep(base[-1]))
base--;
- if (base <= path) /* we can't go that far */
+ if (base <= path) {
+ if (end == base+1 && base[0] == '.' && levels == 1)
+ return strdup("..");
+ /* we can't go that far */
return NULL;
+ }
if (end == base+1 && base[0] == '.')
goto Next;