Fixed a bug that might occur in debug configurations with weird working paths. Thanks to Uli Kusterer for catching it.

This commit is contained in:
Andy Matuschak committed 2009-03-30 15:40:12 -07:00
1 parent 05b75aa44c
commit 23a57f7876
1 file changed
+1 -1
+1 -1
View File
@@ -15,7 +15,7 @@
NSString *path = [[NSBundle bundleForClass:[self class]] pathForResource:nibName ofType:@"nib"];
if (path == nil) // Slight hack to resolve issues with running Sparkle in debug configurations.
{
NSString *frameworkPath = [[host sharedFrameworksPath] stringByAppendingPathComponent:@"Sparkle.framework"];
NSString *frameworkPath = [[[host bundle] sharedFrameworksPath] stringByAppendingPathComponent:@"Sparkle.framework"];
NSBundle *framework = [NSBundle bundleWithPath:frameworkPath];
path = [framework pathForResource:nibName ofType:@"nib"];
}