From: Sean Bright Date: Wed, 8 Mar 2017 23:08:52 +0000 (-0500) Subject: media_cache: Prefer ast_file_is_readable() over access() X-Git-Tag: 14.4.0-rc1~40^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a91a1e15fe5a93b1e1e62333bec8136a952dc658;p=thirdparty%2Fasterisk.git media_cache: Prefer ast_file_is_readable() over access() Change-Id: Icc0dc6e61b2e68d5cdcb74b016b2726a388c7def --- diff --git a/main/media_cache.c b/main/media_cache.c index 4d1cf546a6..e92cce53a2 100644 --- a/main/media_cache.c +++ b/main/media_cache.c @@ -227,7 +227,7 @@ int ast_media_cache_retrieve(const char *uri, const char *preferred_file_name, bucket_file = ao2_find(media_cache, uri, OBJ_SEARCH_KEY | OBJ_NOLOCK); if (bucket_file) { if (!ast_bucket_file_is_stale(bucket_file) - && !access(bucket_file->path, R_OK)) { + && ast_file_is_readable(bucket_file->path)) { ast_copy_string(file_path, bucket_file->path, len); if ((ext = strrchr(file_path, '.'))) { *ext = '\0';