Don't remove the old file if the extension changes

Avoids any chance of a race condition removing a file that is about to be played
This commit is contained in:
Joshua Gigg 2020-09-04 11:29:02 +01:00 committed by GitHub
parent 1b70a706ff
commit 59eaa4c221
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 0 additions and 1 deletions

View File

@ -2823,7 +2823,6 @@ static switch_status_t locate_url_file(http_file_context_t *context, const char
* Update the cache_file path and delete the original file
*/
ext = newext;
unlink(context->cache_file);
context->cache_file = switch_core_sprintf(context->pool, "%s.%s", context->cache_file_base, newext);
}