+2004-11-17 Helge Hess <helge.hess@opengroupware.org>
+
+ * NGBundleManager.m: fixed a bug in the bundle type check when the
+ cached bundle is NSNull (v4.5.133)
+
2004-11-17 Marcus Mueller <znek@mulle-kybernetik.com>
* NGLogging: updated (v4.5.132)
#include "NGBundleManager.h"
#include "common.h"
#include <NGExtensions/NSObject+Logs.h>
+#include <NGExtensions/NSNull+Misc.h>
#import <Foundation/NSFileManager.h>
#import <EOControl/EOQualifier.h>
#include <ctype.h>
bn = [_name stringByAppendingPathExtension:_type];
bundle = NSMapGet(self->nameToBundle, bn);
- if (bundle == nil) {
+ if (![bundle isNotNull]) {
bundle = [self bundleWithPath:
[self pathForBundleWithName:_name type:_type]];
}
- if (bundle != nil && ![[bundle bundleType] isEqualToString:_type])
- bundle = nil;
+ if (![bundle isNotNull]) /* NSNull is used to signal missing bundles */
+ return nil;
+
+ if (![[bundle bundleType] isEqualToString:_type])
+ return nil;
+ /* bundle matches */
return bundle;
}
- (NSBundle *)bundleWithName:(NSString *)_name {
/*
- Copyright (C) 2000-2003 SKYRIX Software AG
+ Copyright (C) 2000-2004 SKYRIX Software AG
- This file is part of OGo
+ This file is part of OpenGroupware.org.
OGo is free software; you can redistribute it and/or modify it under
the terms of the GNU Lesser General Public License as published by the
Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA.
*/
-// $Id$
#ifndef __NSNull_misc_H__
#define __NSNull_misc_H__
# version
-SUBMINOR_VERSION:=132
+SUBMINOR_VERSION:=133
# v4.3.115 requires libFoundation v1.0.59
# v4.2.72 requires libEOControl v4.2.39