diff --git a/shell_integration/MacOSX/OwnCloudFinder/MenuManager.m b/shell_integration/MacOSX/OwnCloudFinder/MenuManager.m index 8a2293e7e9..740b34e294 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 bf675e8fab..7d73c00646 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:@"/"]; }