Fix recursive path when dir is '0'

This commit is contained in:
Laurent Destailleur
2018-01-12 17:12:38 +01:00
parent 32a998e68d
commit 7bfcfd4574

View File

@@ -159,7 +159,7 @@ function dol_dir_list($path, $types="all", $recursive=0, $filter="", $excludefil
// if we're in a directory and we want recursive behavior, call this function again
if ($recursive)
{
$file_list = array_merge($file_list, dol_dir_list($path."/".$file, $types, $recursive, $filter, $excludefilter, $sortcriteria, $sortorder, $mode, $nohook, ($relativename?$relativename.'/':'').$file));
$file_list = array_merge($file_list, dol_dir_list($path."/".$file, $types, $recursive, $filter, $excludefilter, $sortcriteria, $sortorder, $mode, $nohook, ($relativename!=''?$relativename.'/':'').$file));
}
}
else if (! $isdir && (($types == "files") || ($types == "all")))