[INTERPRETER]

* BUG: RDir() now browse directories recursively even if the filter 
  argument is gb.File.


git-svn-id: svn://localhost/gambas/trunk@4550 867c0c6c-44f3-4631-809d-bfa615b0a4ec
This commit is contained in:
Benoît Minisini 2012-03-14 02:11:36 +00:00
parent ca8bc989dd
commit a5982b3d14

View file

@ -775,8 +775,8 @@ void FILE_recursive_dir(const char *dir, void (*found)(const char *), void (*aft
STRING_free(&file_rdir_path);
file_rdir_path = STRING_new_zero(dir);
FILE_dir_first(dir, NULL, attr);
FILE_dir_first(dir, NULL, attr != GB_STAT_DIRECTORY ? 0 : GB_STAT_DIRECTORY);
while (!FILE_dir_next(&file, &len))
{
temp = STRING_new_temp(file, len);
@ -806,9 +806,9 @@ void FILE_recursive_dir(const char *dir, void (*found)(const char *), void (*aft
TRY
{
if (found) (*found)(path);
if (found && (!attr || (attr & GB_STAT_DIRECTORY))) (*found)(path);
FILE_recursive_dir(path, found, afterfound, attr, follow);
if (afterfound) (*afterfound)(path);
if (afterfound && (!attr || (attr & GB_STAT_DIRECTORY))) (*afterfound)(path);
}
CATCH
{