Skip to content
Snippets Groups Projects
Commit 9250ddb8 authored by Joshua Colp's avatar Joshua Colp Committed by Gerrit Code Review
Browse files

Merge "media_cache: Prefer ast_file_is_readable() over access()"

parents 6113bb47 35cfd2c0
No related branches found
No related tags found
No related merge requests found
...@@ -225,7 +225,7 @@ int ast_media_cache_retrieve(const char *uri, const char *preferred_file_name, ...@@ -225,7 +225,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); bucket_file = ao2_find(media_cache, uri, OBJ_SEARCH_KEY | OBJ_NOLOCK);
if (bucket_file) { if (bucket_file) {
if (!ast_bucket_file_is_stale(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); ast_copy_string(file_path, bucket_file->path, len);
if ((ext = strrchr(file_path, '.'))) { if ((ext = strrchr(file_path, '.'))) {
*ext = '\0'; *ext = '\0';
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment