Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/owncloud/client.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkus Goetz <markus@woboq.com>2015-01-29 23:13:09 +0300
committerMarkus Goetz <markus@woboq.com>2015-01-29 23:13:09 +0300
commitbb215ad095de407bc5a56ccca676e2edecd2dbc9 (patch)
tree33686ad4cce87c95127a7160648871c23d563a97 /shell_integration/MacOSX
parentdf214cd6c1a38c551fdb47c970b87c529c3af335 (diff)
OS X: Don't show menu item outside sync folder
As per #2732
Diffstat (limited to 'shell_integration/MacOSX')
-rw-r--r--shell_integration/MacOSX/OwnCloudFinder/MenuManager.m10
-rw-r--r--shell_integration/MacOSX/OwnCloudFinder/RequestManager.m2
2 files changed, 11 insertions, 1 deletions
diff --git a/shell_integration/MacOSX/OwnCloudFinder/MenuManager.m b/shell_integration/MacOSX/OwnCloudFinder/MenuManager.m
index 8a2293e7e..740b34e29 100644
--- a/shell_integration/MacOSX/OwnCloudFinder/MenuManager.m
+++ b/shell_integration/MacOSX/OwnCloudFinder/MenuManager.m
@@ -79,6 +79,16 @@ static MenuManager* sharedInstance = nil;
return;
}
+ for (int i = 0; i < files.count; i++) {
+ NSString *fn = [files objectAtIndex:i];
+ BOOL isDir = false;
+ if ([[NSFileManager defaultManager] fileExistsAtPath:fn isDirectory:&isDir]) {
+ if (![requestManager isRegisteredPath:fn isDirectory:isDir]) {
+ return;
+ }
+ }
+ }
+
NSMutableArray* menuItemsArray = [[[NSMutableArray alloc] init] autorelease];
NSMutableDictionary *firstEntry = [[[NSMutableDictionary alloc] init] autorelease];
[firstEntry setValue:[NSNumber numberWithBool:YES] forKey:@"enabled"];
diff --git a/shell_integration/MacOSX/OwnCloudFinder/RequestManager.m b/shell_integration/MacOSX/OwnCloudFinder/RequestManager.m
index bf675e8fa..7d73c0064 100644
--- a/shell_integration/MacOSX/OwnCloudFinder/RequestManager.m
+++ b/shell_integration/MacOSX/OwnCloudFinder/RequestManager.m
@@ -86,7 +86,7 @@ static RequestManager* sharedInstance = nil;
BOOL registered = NO;
NSString* checkPath = [NSString stringWithString:path];
- if (isDir) {
+ if (isDir && ![checkPath hasSuffix:@"/"]) {
// append a slash
checkPath = [path stringByAppendingString:@"/"];
}