From d5c9088893890f8f6fa5d1f7dda227605384c67b Mon Sep 17 00:00:00 2001 From: Benjamin Verdier Date: Thu, 26 Jul 2018 16:01:11 +0200 Subject: [PATCH] fix and clean of call view recording button --- Classes/CallView.m | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/Classes/CallView.m b/Classes/CallView.m index 67bebb6b7..33c416c6e 100644 --- a/Classes/CallView.m +++ b/Classes/CallView.m @@ -726,11 +726,15 @@ static void hideSpinner(LinphoneCall *call, void *user_data) { LinphoneCall *call = linphone_core_get_current_call(LC); linphone_call_stop_recording(call); + callRecording = FALSE; + NSArray *paths = NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES); NSString *writablePath = [paths objectAtIndex:0]; - writablePath = [writablePath stringByAppendingString:@""]; - - callRecording = FALSE; + writablePath = [writablePath stringByAppendingString:@"/"]; + NSArray *directoryContent = [[NSFileManager defaultManager] contentsOfDirectoryAtPath:writablePath error:NULL]; + if (directoryContent) { + return; + } } else { LOGD(@"Recording Starts");