Re: [Mesa-dev] [PATCH] util/disk_cache: use stat() to check if entry is a directory

2017-02-10 Thread Jan Ziak
Hello Mesa should check that return value of stat() equals 0. if (stat_retval == 0 && !S_ISREG(sb.st_mode)) return false; ... if (stat_retval == 0 && !S_ISDIR(sb.st_mode)) return false; Jan ___ mesa-dev mailing list mesa-dev@lists.freed

Re: [Mesa-dev] [PATCH] util/disk_cache: use stat() to check if entry is a directory

2017-02-10 Thread Emil Velikov
On 9 February 2017 at 23:05, Timothy Arceri wrote: > d_type is not supported on all systems. > > Tested-by: Vinson Lee > Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=97967 CC: "13.0 17.0" Reviewed-by: Emil Velikov > @@ -473,7 +474,7 @@ choose_random_file_matching(const char *dir_path

[Mesa-dev] [PATCH] util/disk_cache: use stat() to check if entry is a directory

2017-02-09 Thread Timothy Arceri
d_type is not supported on all systems. Tested-by: Vinson Lee Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=97967 --- src/util/disk_cache.c | 33 - 1 file changed, 24 insertions(+), 9 deletions(-) diff --git a/src/util/disk_cache.c b/src/util/disk_cache.