Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixed docset installation. Addressing #407, #408, #409 and #412.

The problem was due to template files copy step issued for each output generator. This code basically deletes output path and copies template files over. However in doing so after docset was already prepared, it invalidated all previous effort.

PS Don't worry about the number of addressed issues - these are (likely) pointing to the same problem!
  • Loading branch information...
commit 877681c1d2c97894ec0a9e0dedf236b58f13c528 1 parent 536b1c9
@tomaz authored
View
5 Generating/GBDocSetInstallGenerator.m
@@ -68,6 +68,11 @@ - (void)touchInstallMessageFile {
#pragma mark Overriden methods
+- (BOOL)copyTemplateFilesToOutputPath:(NSError **)error {
+ // At this stage we must not copy template files as this will overwrite generated docset!
+ return YES;
+}
+
- (NSString *)outputUserPath {
// Our output is the documentation set we just installed. (We have to output it in case publishing is in the queue next.)
return self.inputUserPath;
View
2  Generating/GBDocSetPublishGenerator.m
@@ -72,7 +72,7 @@ - (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"])
+ if (url && ![url hasSuffix:@".xar"])
{
url = [url stringByAppendingPathExtension:@"xar"];
}
View
2  Generating/GBOutputGenerator.m
@@ -62,7 +62,7 @@ - (BOOL)initializeDirectoryAtPath:(NSString *)path preserve:(NSArray *)preserve
}
} else if (exists) {
GBLogDebug(@"Enumerating directory contents...");
- NSArray *contents = [self.fileManager contentsOfDirectoryAtPath:path error:error];
+ NSArray *contents = [self.fileManager contentsOfDirectoryAtPath:standardized error:error];
if (!contents && error && *error) return NO;
for (NSString *subpath in contents) {
if (![preserve containsObject:subpath]) {
Please sign in to comment.
Something went wrong with that request. Please try again.