summaryrefslogtreecommitdiffstats
path: root/apps/filetree.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/filetree.c')
-rw-r--r--apps/filetree.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/apps/filetree.c b/apps/filetree.c
index a46ffbb2bc..324266e64f 100644
--- a/apps/filetree.c
+++ b/apps/filetree.c
@@ -184,11 +184,16 @@ static int compare(const void* p1, const void* p2)
}
/* load and sort directory into dircache. returns NULL on failure. */
-int ft_load(struct tree_context* c)
+int ft_load(struct tree_context* c, const char* tempdir)
{
int i;
int name_buffer_used = 0;
- DIR *dir = opendir(c->currdir);
+ DIR *dir;
+
+ if (tempdir)
+ dir = opendir(tempdir);
+ else
+ dir = opendir(c->currdir);
if(!dir)
return -1; /* not a directory */