diff options
Diffstat (limited to 'apps/filetree.c')
-rw-r--r-- | apps/filetree.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/apps/filetree.c b/apps/filetree.c index 66b5c843ca..11d562f586 100644 --- a/apps/filetree.c +++ b/apps/filetree.c | |||
@@ -820,6 +820,11 @@ int ft_exit(struct tree_context* c) | |||
820 | int rc = 0; | 820 | int rc = 0; |
821 | bool exit_func = false; | 821 | bool exit_func = false; |
822 | int i = strlen(c->currdir); | 822 | int i = strlen(c->currdir); |
823 | |||
824 | /* strip trailing slashes */ | ||
825 | while (c->currdir[i-1] == PATH_SEPCH) | ||
826 | i--; | ||
827 | |||
823 | if (i>1) { | 828 | if (i>1) { |
824 | while (c->currdir[i-1]!=PATH_SEPCH) | 829 | while (c->currdir[i-1]!=PATH_SEPCH) |
825 | i--; | 830 | i--; |