diff options
author | Jocelyn Turcotte <jturcotte@woboq.com> | 2017-01-11 20:17:27 +0300 |
---|---|---|
committer | Jocelyn Turcotte <jturcotte@woboq.com> | 2017-01-18 14:15:52 +0300 |
commit | cb5cfb8cf6e4d3f90b68145153b5816dff3de155 (patch) | |
tree | 9651d5fc0911625d37935e474ce9747665f60a6d /shell_integration | |
parent | ebd2a15711472302401879f9fec38370860e7cb6 (diff) |
shell/macOS: Make sure the root folder's cache is cleared on disconnect
The SocketAPI now only sends status pushes for paths requested by the
shell. We have to make sure that Finder doesn't just show the entry
from its cache after a reconnect.
Diffstat (limited to 'shell_integration')
-rw-r--r-- | shell_integration/MacOSX/OwnCloudFinderSync/FinderSyncExt/FinderSync.m | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/shell_integration/MacOSX/OwnCloudFinderSync/FinderSyncExt/FinderSync.m b/shell_integration/MacOSX/OwnCloudFinderSync/FinderSyncExt/FinderSync.m index a86f9485b..065be2e2f 100644 --- a/shell_integration/MacOSX/OwnCloudFinderSync/FinderSyncExt/FinderSync.m +++ b/shell_integration/MacOSX/OwnCloudFinderSync/FinderSyncExt/FinderSync.m @@ -155,9 +155,13 @@ { _shareMenuTitle = nil; + [_registeredDirectories removeAllObjects]; + // For some reason the FIFinderSync cache doesn't seem to be cleared for the root item when + // we reset the directoryURLs (seen on macOS 10.12 at least). + // First setting it to the FS root and then setting it to nil seems to work around the issue. + [FIFinderSyncController defaultController].directoryURLs = [NSSet setWithObject:[NSURL fileURLWithPath:@"/"]]; // This will tell Finder that this extension isn't attached to any directory // until we can reconnect to the sync client. - [_registeredDirectories removeAllObjects]; [FIFinderSyncController defaultController].directoryURLs = nil; } |