Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Fixes a bug causing the xar-file URL to be incorrect #339

Merged
merged 2 commits into from Mar 13, 2013
Jump to file or symbol
Failed to load files and symbols.
+7 −2
Split
@@ -28,7 +28,6 @@ - (BOOL)generateOutputWithStore:(id)store error:(NSError **)error {
// Get the path to the installed documentation set and extract the name. Then replace the name's extension with .xar.
NSString *inputDocSetPath = self.inputUserPath;
- NSString *packageName = [self.settings.docsetPackageFilename stringByDeletingPathExtension];
NSString *atomName = self.settings.docsetAtomFilename;
NSString *xmlName = self.settings.docsetXMLFilename;
NSString *installedDocSetPath = inputDocSetPath;
@@ -46,7 +45,7 @@ - (BOOL)generateOutputWithStore:(id)store error:(NSError **)error {
// Prepare command line arguments for packaging.
NSString *outputDir = self.outputUserPath;
- NSString *outputDocSetPath = [outputDir stringByAppendingPathComponent:packageName];
+ NSString *outputDocSetPath = [outputDir stringByAppendingPathComponent:self.settings.docsetPackageFilename];
NSString *outputAtomPath = [outputDir stringByAppendingPathComponent:atomName];
NSString *outputXMLPath = [outputDir stringByAppendingPathComponent:xmlName];
NSString *signer = self.settings.docsetCertificateSigner;
@@ -72,6 +71,12 @@ - (BOOL)generateOutputWithStore:(id)store error:(NSError **)error {
if(self.settings.docsetFeedFormats & GBPublishedFeedFormatAtom)
{
+ // typical atom enclosure url does not have an extension, add it if it doesn't
+ if (![url hasSuffix:@".xar"])
+ {
+ url = [url stringByAppendingPathExtension:@"xar"];
+ }
+
// Create command line arguments array.
NSMutableArray *args = [NSMutableArray array];
[args addObject:@"docsetutil"];