Permalink
Browse files

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.
  • Loading branch information...
1 parent 09ebc6a commit 1bd70657c12a4f6e44219d40c028d1801c8fedb6 @odrobnik odrobnik committed Mar 13, 2013
Showing with 6 additions and 0 deletions.
  1. +6 −0 Generating/GBDocSetPublishGenerator.m
@@ -71,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"];

0 comments on commit 1bd7065

Please sign in to comment.