aboutsummaryrefslogtreecommitdiffstats
path: root/android/utils/path.c
diff options
context:
space:
mode:
Diffstat (limited to 'android/utils/path.c')
-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;