Fix listing files directly under /

This commit is contained in:
Arun Prakash Jana 2020-04-18 15:08:23 +05:30
parent b40e12ee9f
commit 12df1ab083
No known key found for this signature in database
GPG Key ID: A75979F35C080412
1 changed files with 4 additions and 0 deletions

View File

@ -6301,6 +6301,10 @@ static char *make_tmp_tree(char **paths, ssize_t entries, const char *prefix)
/* Points right after the base tmp dir */
tmp += 10;
/* handle the case where files are directly under / */
if (!prefix[1] && (prefix[0] == '/'))
len = 0;
if (!mkdtemp(tmpdir)) {
free(tmpdir);