File tree Expand file tree Collapse file tree
shell_integration/MacOSX/NextcloudIntegration Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -51,7 +51,7 @@ private func readBundleIdentity() -> BundleIdentity? {
5151 return BundleIdentity ( serviceName: serviceName,
5252 teamIdentifier: team,
5353 applicationRevDomain: revDomain,
54- version: info [ " CFBundleVersion " ] as? String ?? " 0 " )
54+ version: info [ " CFBundleShortVersionString " ] as? String ?? " " )
5555}
5656
5757/// Prove the listener is actually reachable, rather than assuming it is.
Original file line number Diff line number Diff line change @@ -80,7 +80,7 @@ NS_ASSUME_NONNULL_BEGIN
8080 * unregister completion handler before re-registering, because registering too early
8181 * fails with SMAppServiceErrorDomain code 1.
8282 *
83- * @param reply Invoked with the broker's CFBundleVersion .
83+ * @param reply Invoked with the broker's CFBundleShortVersionString .
8484 */
8585- (void )brokerVersionWithReply : (void (^)(NSString *version))reply ;
8686
Original file line number Diff line number Diff line change 44 */
55
66#include " findersyncxpc.h"
7+ #include " version.h"
78
89#import < Foundation/Foundation.h>
910#import " ../../../shell_integration/MacOSX/NextcloudIntegration/FinderSyncExt/Services/FinderSyncProtocol.h"
@@ -332,11 +333,7 @@ - (BOOL)listener:(NSXPCListener *)listener shouldAcceptNewConnection:(NSXPCConne
332333 // and we would go on talking to last version's broker indefinitely.
333334 [broker brokerVersionWithReply: ^(NSString *version) {
334335 const auto brokerVersion = QString::fromNSString (version);
335- // Deliberately the literal key rather than kCFBundleVersionKey: that constant would add
336- // a CoreFoundation data symbol to this translation unit for no benefit, and the other
337- // Info.plist reads here use literals too.
338- const auto ourVersion = QString::fromNSString (
339- [[NSBundle mainBundle ] objectForInfoDictionaryKey: @" CFBundleVersion" ]);
336+ const auto ourVersion = QString::fromLatin1 (MIRALL_STRINGIFY (MIRALL_VERSION ));
340337
341338 if (brokerVersion == ourVersion) {
342339 qCDebug (lcFinderSyncXPC) << " Broker version matches ours:" << brokerVersion;
You can’t perform that action at this time.
0 commit comments