aboutsummaryrefslogtreecommitdiffstats
path: root/android
diff options
context:
space:
mode:
authorAndrew Hsieh <andrewhsieh@google.com>2012-05-02 12:14:34 +0800
committerAndrew Hsieh <andrewhsieh@google.com>2012-05-02 12:14:34 +0800
commit509433edf704644190bc6715adcb1272a1955da3 (patch)
treebf0504d34e5542f2b2a352e0872c41b2fe1cca9e /android
parent3d894287d2907dc6a0fc45d7a5b77dbe76ab2bd6 (diff)
downloadexternal_qemu-509433edf704644190bc6715adcb1272a1955da3.zip
external_qemu-509433edf704644190bc6715adcb1272a1955da3.tar.gz
external_qemu-509433edf704644190bc6715adcb1272a1955da3.tar.bz2
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
Diffstat (limited to 'android')
-rw-r--r--android/utils/path.c6
1 files changed, 5 insertions, 1 deletions
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 @@ path_parent( const char* path, int levels )
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;