From 2c613c9a5c51a95c18aba430b6c0c7ac465da29e Mon Sep 17 00:00:00 2001 From: maxkadushkin Date: Mon, 29 Jan 2024 14:43:29 +0300 Subject: [PATCH] [macos] fix bug 66119 --- .../Code/Controllers/Common/ASCCommonViewController.mm | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/macos/ONLYOFFICE/Code/Controllers/Common/ASCCommonViewController.mm b/macos/ONLYOFFICE/Code/Controllers/Common/ASCCommonViewController.mm index 01570fdd6..fdbc3b9f1 100644 --- a/macos/ONLYOFFICE/Code/Controllers/Common/ASCCommonViewController.mm +++ b/macos/ONLYOFFICE/Code/Controllers/Common/ASCCommonViewController.mm @@ -1904,9 +1904,14 @@ - (void)tabs:(ASCTabsControl *)control didAddTab:(ASCTabView *)tab { } case ASCTabActionOpenLocalRecentFile: { NSInteger docId = [tab.params[@"fileId"] intValue]; -// NSString * filePath = tab.params[@"path"]; - [cefView openRecentFileWithId:docId]; + if ( !(docId < 0) ) + [cefView openRecentFileWithId:docId]; + else { + NSString * filePath = tab.params[@"path"]; + if ( filePath && filePath.length ) + [cefView loadWithUrl:filePath]; + } [[AnalyticsHelper sharedInstance] recordCachedEventWithCategory:ASCAnalyticsCategoryApplication action:@"Open local file"