mirror of
https://github.com/nextcloud/desktop.git
synced 2024-10-28 16:13:53 +03:00
Merge pull request #354 from nextcloud/upstream/pr/6444
macOS: Unload the Finder extension on exit #5382 #3819
This commit is contained in:
commit
5b0a1d4c79
1 changed files with 9 additions and 0 deletions
|
@ -181,6 +181,10 @@ SocketApi::SocketApi(QObject *parent)
|
||||||
// Example for developer builds (with ad-hoc signing identity): "" "com.owncloud.desktopclient" ".socketApi"
|
// Example for developer builds (with ad-hoc signing identity): "" "com.owncloud.desktopclient" ".socketApi"
|
||||||
// Example for official signed packages: "9B5WD74GWJ." "com.owncloud.desktopclient" ".socketApi"
|
// Example for official signed packages: "9B5WD74GWJ." "com.owncloud.desktopclient" ".socketApi"
|
||||||
socketPath = SOCKETAPI_TEAM_IDENTIFIER_PREFIX APPLICATION_REV_DOMAIN ".socketApi";
|
socketPath = SOCKETAPI_TEAM_IDENTIFIER_PREFIX APPLICATION_REV_DOMAIN ".socketApi";
|
||||||
|
#ifdef Q_OS_MAC
|
||||||
|
// Tell Finder to use the Extension (checking it from System Preferences -> Extensions)
|
||||||
|
system("pluginkit -e use -i " APPLICATION_REV_DOMAIN ".FinderSyncExt &");
|
||||||
|
#endif
|
||||||
} else if (Utility::isLinux() || Utility::isBSD()) {
|
} else if (Utility::isLinux() || Utility::isBSD()) {
|
||||||
QString runtimeDir;
|
QString runtimeDir;
|
||||||
runtimeDir = QStandardPaths::writableLocation(QStandardPaths::RuntimeLocation);
|
runtimeDir = QStandardPaths::writableLocation(QStandardPaths::RuntimeLocation);
|
||||||
|
@ -218,6 +222,11 @@ SocketApi::~SocketApi()
|
||||||
// All remaining sockets will be destroyed with _localServer, their parent
|
// All remaining sockets will be destroyed with _localServer, their parent
|
||||||
ASSERT(_listeners.isEmpty() || _listeners.first().socket->parent() == &_localServer);
|
ASSERT(_listeners.isEmpty() || _listeners.first().socket->parent() == &_localServer);
|
||||||
_listeners.clear();
|
_listeners.clear();
|
||||||
|
|
||||||
|
#ifdef Q_OS_MAC
|
||||||
|
// Unload the extension (uncheck from System Preferences -> Extensions)
|
||||||
|
system("pluginkit -e ignore -i " APPLICATION_REV_DOMAIN ".FinderSyncExt &");
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void SocketApi::slotNewConnection()
|
void SocketApi::slotNewConnection()
|
||||||
|
|
Loading…
Reference in a new issue