Skip to content
This repository

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

Merged
merged 2 commits into from about 1 year ago

2 participants

Oliver Drobnik tomaz
Oliver Drobnik

This causes problems since there is not supposed to be an extension anyway. Removing an extension from DTCoreText-1.2 causes the package name to be become DTCoreText-1.xar which is wrong.

Fixes #338

added some commits March 13, 2013
Oliver Drobnik Removed superfluous removing of extension.
This causes problems since there is not supposed to be an extension anyway. Removing an extension from DTCoreText-1.2 causes the package name to be become DTCoreText-1.xar which is wrong.

Fixes #338
09ebc6a
Oliver Drobnik Add the .xar extension to the enclosure URL if necessary
Fixes #338

The extension xar is added to the output file path for the docset utility, but it is not checked that it is in the url. Without this there is a scenario where the URL is missing the extension.
1bd7065
tomaz tomaz merged commit 049e3a8 into from March 13, 2013
tomaz tomaz closed this March 13, 2013
tomaz
Owner
tomaz commented March 13, 2013

Merged, thanks again!

Frederic Bronner fbronner referenced this pull request from a commit in fbronner/appledoc April 30, 2013
Revert "Merge pull request #339 from Cocoanetics/atomurlfix"
This reverts commit 049e3a8, reversing
changes made to 81cf405.
c79b6eb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Showing 2 unique commits by 1 author.

Mar 13, 2013
Oliver Drobnik Removed superfluous removing of extension.
This causes problems since there is not supposed to be an extension anyway. Removing an extension from DTCoreText-1.2 causes the package name to be become DTCoreText-1.xar which is wrong.

Fixes #338
09ebc6a
Oliver Drobnik Add the .xar extension to the enclosure URL if necessary
Fixes #338

The extension xar is added to the output file path for the docset utility, but it is not checked that it is in the url. Without this there is a scenario where the URL is missing the extension.
1bd7065
This page is out of date. Refresh to see the latest.

Showing 1 changed file with 7 additions and 2 deletions. Show diff stats Hide diff stats

  1. 9  Generating/GBDocSetPublishGenerator.m
9  Generating/GBDocSetPublishGenerator.m
@@ -28,7 +28,6 @@ - (BOOL)generateOutputWithStore:(id)store error:(NSError **)error {
28 28
 	
29 29
 	// Get the path to the installed documentation set and extract the name. Then replace the name's extension with .xar.
30 30
 	NSString *inputDocSetPath = self.inputUserPath;
31  
-	NSString *packageName = [self.settings.docsetPackageFilename stringByDeletingPathExtension];
32 31
 	NSString *atomName = self.settings.docsetAtomFilename;
33 32
     NSString *xmlName = self.settings.docsetXMLFilename;
34 33
     NSString *installedDocSetPath = inputDocSetPath;
@@ -46,7 +45,7 @@ - (BOOL)generateOutputWithStore:(id)store error:(NSError **)error {
46 45
 	
47 46
 	// Prepare command line arguments for packaging.
48 47
 	NSString *outputDir = self.outputUserPath;
49  
-	NSString *outputDocSetPath = [outputDir stringByAppendingPathComponent:packageName];
  48
+	NSString *outputDocSetPath = [outputDir stringByAppendingPathComponent:self.settings.docsetPackageFilename];
50 49
 	NSString *outputAtomPath = [outputDir stringByAppendingPathComponent:atomName];
51 50
     NSString *outputXMLPath = [outputDir stringByAppendingPathComponent:xmlName];
52 51
 	NSString *signer = self.settings.docsetCertificateSigner;
@@ -72,6 +71,12 @@ - (BOOL)generateOutputWithStore:(id)store error:(NSError **)error {
72 71
 	
73 72
     if(self.settings.docsetFeedFormats & GBPublishedFeedFormatAtom)
74 73
     {
  74
+        // typical atom enclosure url does not have an extension, add it if it doesn't
  75
+        if (![url hasSuffix:@".xar"])
  76
+        {
  77
+            url = [url stringByAppendingPathExtension:@"xar"];
  78
+        }
  79
+        
75 80
         // Create command line arguments array.
76 81
         NSMutableArray *args = [NSMutableArray array];
77 82
         [args addObject:@"docsetutil"];
Commit_comment_tip

Tip: You can add notes to lines in a file. Hover to the left of a line to make a note

Something went wrong with that request. Please try again.