Skip to content

Commit

Permalink
Small fix
Browse files Browse the repository at this point in the history
  • Loading branch information
levinli303 committed Jan 29, 2024
1 parent 645ff53 commit bd9f354
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
6 changes: 2 additions & 4 deletions CelestiaUI/Addon/Models/ResourceManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,7 @@ public final class ResourceManager: @unchecked Sendable {
var items = [ResourceItem]()
let fm = FileManager.default
// Parse script folder first, because add-on folder might need migration
if let scriptDirectory = extraScriptDirectory {
guard let folders = try? fm.contentsOfDirectory(atPath: scriptDirectory.path) else { return [] }
if let scriptDirectory = extraScriptDirectory, let folders = try? fm.contentsOfDirectory(atPath: scriptDirectory.path) {
for folder in folders {
let descriptionFile = scriptDirectory.appendingPathComponent(folder).appendingPathComponent("description.json")
if let data = try? Data(contentsOf: descriptionFile),
Expand All @@ -81,8 +80,7 @@ public final class ResourceManager: @unchecked Sendable {
}
}
}
if let addonDirectory = extraAddonDirectory {
guard let folders = try? fm.contentsOfDirectory(atPath: addonDirectory.path) else { return [] }
if let addonDirectory = extraAddonDirectory, let folders = try? fm.contentsOfDirectory(atPath: addonDirectory.path) {
for folder in folders {
let folderURL = addonDirectory.appendingPathComponent(folder)
let descriptionFile = folderURL.appendingPathComponent("description.json")
Expand Down
8 changes: 4 additions & 4 deletions MobileCelestia.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -1613,8 +1613,8 @@
MACOSX_DEPLOYMENT_TARGET = 10.15;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
SHARED_BUILD_NUMBER = 426;
SHARED_BUILD_VERSION = 1.6.6;
SHARED_BUILD_NUMBER = 431;
SHARED_BUILD_VERSION = 1.6.7;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
TARGETED_DEVICE_FAMILY = "1,2,6";
Expand Down Expand Up @@ -1670,8 +1670,8 @@
IPHONEOS_DEPLOYMENT_TARGET = 13.1;
MACOSX_DEPLOYMENT_TARGET = 10.15;
SDKROOT = iphoneos;
SHARED_BUILD_NUMBER = 426;
SHARED_BUILD_VERSION = 1.6.6;
SHARED_BUILD_NUMBER = 431;
SHARED_BUILD_VERSION = 1.6.7;
SWIFT_COMPILATION_MODE = wholemodule;
SWIFT_OPTIMIZATION_LEVEL = "-O";
TARGETED_DEVICE_FAMILY = "1,2,6";
Expand Down

0 comments on commit bd9f354

Please sign in to comment.