Skip to content

Commit 85b8cef

Browse files
committed
Fix #24
1 parent 136b51c commit 85b8cef

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

Dash/DHFeed.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,5 +59,6 @@
5959
- (void)adjustTitleLabelWidthBasedOnButtonsShown;
6060
- (UIImage *)icon;
6161
- (NSString *)uniqueIdentifier; // Used to find a corresponding feed from a installed docset
62+
- (NSString *)installFolderName;
6263

6364
@end

Dash/DHFeed.m

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -231,4 +231,9 @@ - (NSString *)uniqueIdentifier // Used to find a corresponding feed from a insta
231231
return self.feedURL;
232232
}
233233

234+
- (NSString *)installFolderName
235+
{
236+
return (self._uniqueIdentifier) ? self._uniqueIdentifier.lastPathComponent : self.feed.lastPathComponent.stringByDeletingPathExtension;
237+
}
238+
234239
@end

Dash/DHRepo.m

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -827,8 +827,7 @@ - (NSString *)docsetInstallFolderPath
827827

828828
- (NSString *)docsetPathForFeed:(DHFeed *)feed
829829
{
830-
NSString *filename = [[feed.feed lastPathComponent] stringByDeletingPathExtension];
831-
return [[self docsetInstallFolderPath] stringByAppendingPathComponent:filename];
830+
return [[self docsetInstallFolderPath] stringByAppendingPathComponent:feed.installFolderName];
832831
}
833832

834833
- (NSString *)defaultsKey

0 commit comments

Comments
 (0)