mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-09-18 00:21:27 +00:00
Fix for **** type in DocumentController, and an Info.plist bug in bundle tasks.
This commit is contained in:
@@ -276,7 +276,8 @@ var CPSharedDocumentController = nil;
|
||||
var index = 0,
|
||||
count = _documentTypes.length,
|
||||
|
||||
extension = [[anAbsoluteURL pathExtension] lowercaseString];
|
||||
extension = [[anAbsoluteURL pathExtension] lowercaseString],
|
||||
starType = nil;
|
||||
|
||||
for (; index < count; ++index)
|
||||
{
|
||||
@@ -286,12 +287,17 @@ var CPSharedDocumentController = nil;
|
||||
extensionCount = extensions.length;
|
||||
|
||||
for (; extensionIndex < extensionCount; ++extensionIndex)
|
||||
if ([extensions[extensionIndex] lowercaseString] === extension)
|
||||
{
|
||||
var thisExtension = [extensions[extensionIndex] lowercaseString];
|
||||
if (thisExtension === extension)
|
||||
return [documentType objectForKey:@"CPBundleTypeName"];
|
||||
|
||||
if (thisExtension === "****")
|
||||
starType = [documentType objectForKey:@"CPBundleTypeName"];
|
||||
}
|
||||
}
|
||||
|
||||
// FIXME?
|
||||
return [self defaultType];//nil;
|
||||
return starType || [self defaultType];
|
||||
}
|
||||
|
||||
// Managing Document Types
|
||||
|
||||
@@ -383,6 +383,11 @@ BundleTask.prototype.defineInfoPlistTask = function()
|
||||
require("objective-j/plist").writePlist(infoPlistProductPath, bundleTask.infoPlist());
|
||||
});
|
||||
|
||||
var infoPlistPath = this.infoPlistPath();
|
||||
|
||||
if (infoPlistPath && FILE.exists(infoPlistPath))
|
||||
filedir (infoPlistProductPath, [infoPlistPath]);
|
||||
|
||||
this.enhance([infoPlistProductPath]);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user