Skip to content

Commit

Permalink
Merge pull request #2344 from saagarjha/master
Browse files Browse the repository at this point in the history
  • Loading branch information
tbodt authored Apr 24, 2024
2 parents 62d891a + 353e767 commit af96981
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion app/Theme.m
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,12 @@ + (NSURL *)themesDirectory {
+ (NSArray<Theme *> *)userThemes {
NSMutableArray<Theme *> *themes = [NSMutableArray new];
for (NSURL *file in [NSFileManager.defaultManager contentsOfDirectoryAtURL:self.themesDirectory includingPropertiesForKeys:nil options:0 error:nil]) {
Theme *theme = [[Theme alloc] initWithName:file.lastPathComponent.stringByDeletingPathExtension data:[NSData dataWithContentsOfURL:file]];
NSData *data = [NSData dataWithContentsOfURL:file];
if (!data) {
continue;
}

Theme *theme = [[Theme alloc] initWithName:file.lastPathComponent.stringByDeletingPathExtension data:data];
if (theme) {
[themes addObject:theme];
}
Expand Down

0 comments on commit af96981

Please sign in to comment.