diff --git a/shell_integration/MacOSX/OwnCloudFinder/ContentManager.m b/shell_integration/MacOSX/OwnCloudFinder/ContentManager.m index b9e49e7cb..d0a6659d0 100644 --- a/shell_integration/MacOSX/OwnCloudFinder/ContentManager.m +++ b/shell_integration/MacOSX/OwnCloudFinder/ContentManager.m @@ -118,7 +118,7 @@ static ContentManager* sharedInstance = nil; if (![_fileNamesCache objectForKey:normalizedPath] || ![[_fileNamesCache objectForKey:normalizedPath] isEqualTo:res]) { [_fileNamesCache setObject:res forKey:normalizedPath]; - // NSLog(@"SET value %d", [res intValue]); + //NSLog(@"SET value %d %@", [res intValue], normalizedPath); _hasChangedContent = YES; [self performSelector:@selector(repaintAllWindowsIfNeeded) withObject:0 afterDelay:1.0]; // 1 sec } @@ -144,7 +144,7 @@ static ContentManager* sharedInstance = nil; } NSNumber* result = [_fileNamesCache objectForKey:normalizedPath]; - // NSLog(@"XXXXXXX Asking for icon for path %@ = %d",path, [result intValue]); + // NSLog(@"XXXXXXX Asking for icon for path %@ = %d",normalizedPath, [result intValue]); if( result == nil ) { // start the async call @@ -192,15 +192,22 @@ static ContentManager* sharedInstance = nil; - (void)reFetchFileNameCacheForPath:(NSString*)path { - // NSLog(@"%@", NSStringFromSelector(_cmd)); + NSLog(@"%@", NSStringFromSelector(_cmd)); for (id p in [_fileNamesCache keyEnumerator]) { if ( path && [p hasPrefix:path] ) { - NSNumber *askState = [[RequestManager sharedInstance] askForIcon:p isDirectory:false]; // FIXME - //[_fileNamesCache setObject:askState forKey:p]; - NSLog(@"%@ %@", NSStringFromSelector(_cmd), p); + [[RequestManager sharedInstance] askForIcon:p isDirectory:false]; // FIXME isDirectory parameter + //[_fileNamesCache setObject:askState forKey:p]; We don't do this since we want to keep the old icon meanwhile + //NSLog(@"%@ %@", NSStringFromSelector(_cmd), p); } } + + // Ask for directory itself + if ([path hasSuffix:@"/"]) { + path = [path substringToIndex:path.length - 1]; + } + [[RequestManager sharedInstance] askForIcon:path isDirectory:true]; + //NSLog(@"%@ %@", NSStringFromSelector(_cmd), path); } diff --git a/shell_integration/MacOSX/OwnCloudFinder/IconOverlayHandlers.m b/shell_integration/MacOSX/OwnCloudFinder/IconOverlayHandlers.m index ca9592396..d51cea9a9 100644 --- a/shell_integration/MacOSX/OwnCloudFinder/IconOverlayHandlers.m +++ b/shell_integration/MacOSX/OwnCloudFinder/IconOverlayHandlers.m @@ -77,7 +77,7 @@ } NSNumber* imageIndex = [[ContentManager sharedInstance] iconByPath:[url path] isDirectory:isDir]; - // NSLog(@"2 The icon index is %d", [imageIndex intValue]); + //NSLog(@"2 The icon index is %d %@ %@", [imageIndex intValue], [url path], isDir ? @"isDir" : @""); if ([imageIndex intValue] > 0) {