RDir() now works correctly when browsing executable directories.

[INTERPRETER]
* BUG: RDir() now works correctly when browsing executable directories.
This commit is contained in:
gambas 2018-03-16 14:02:58 +01:00
parent c995af165c
commit 4c38b0f5c3

View file

@ -835,7 +835,7 @@ void FILE_recursive_dir(const char *dir, void (*found)(const char *), void (*aft
char *temp;
bool is_dir;
#if OPT_NLINK
int nsubdir = 0;
int nsubdir = -1;
#endif
if (!dir || *dir == 0)
@ -849,7 +849,7 @@ void FILE_recursive_dir(const char *dir, void (*found)(const char *), void (*aft
FILE_dir_first(dir, NULL, attr != GB_STAT_DIRECTORY ? 0 : GB_STAT_DIRECTORY);
#if OPT_NLINK
if (file_dir)
if (file_dir && !FILE_is_relative(dir))
{
struct stat dinfo;
fstat(dirfd(file_dir), &dinfo);