From e90c77e79293e1e5c412b8e5aa0ff196882b791a Mon Sep 17 00:00:00 2001 From: Miltiadis Vasilakis Date: Sat, 12 Nov 2011 11:45:50 +0200 Subject: [PATCH] Bug fixes. --- pithos-macos/PithosContainerNode.m | 3 ++- pithos-macos/pithos_macosAppDelegate.m | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/pithos-macos/PithosContainerNode.m b/pithos-macos/PithosContainerNode.m index 5631490..cccdd13 100644 --- a/pithos-macos/PithosContainerNode.m +++ b/pithos-macos/PithosContainerNode.m @@ -247,7 +247,8 @@ static NSImage *sharedIcon = nil; BOOL isSubdirNode = ([self class] == [PithosSubdirNode class]); for (ASIPithosObject *object in objects) { if (!isSubdirNode || - [object.name hasPrefix:[((PithosSubdirNode *)self).prefix stringByAppendingString:@"/"]]) { + ([object.name hasPrefix:[((PithosSubdirNode *)self).prefix stringByAppendingString:@"/"]] && + ([object.name length] > [((PithosSubdirNode *)self).prefix length] + 1))) { // The check above removes false objects due to trailing slash or same prefix if (object.subdir) { NSUInteger sameNameObjectIndex = [objectNames indexOfObject:[object.name substringToIndex:([object.name length] - 1)]]; diff --git a/pithos-macos/pithos_macosAppDelegate.m b/pithos-macos/pithos_macosAppDelegate.m index efa7a72..6add144 100644 --- a/pithos-macos/pithos_macosAppDelegate.m +++ b/pithos-macos/pithos_macosAppDelegate.m @@ -89,9 +89,9 @@ if (!syncContainerName || ![syncContainerName length] || [syncContainerName isEqualToString:@"trash"]) [userDefaults setObject:@"pithos" forKey:@"syncContainerName"]; - double syncTimeInterval = [userDefaults doubleForKey:@"syncTimeInteral"]; + double syncTimeInterval = [userDefaults doubleForKey:@"syncTimeInterval"]; if (syncTimeInterval <= 0) - [userDefaults setDouble:180.0 forKey:@"syncTimeInteral"]; + [userDefaults setDouble:180.0 forKey:@"syncTimeInterval"]; [userDefaults synchronize]; -- 1.7.10.4