Skip to content

Commit

Permalink
Update PassKit.swift
Browse files Browse the repository at this point in the history
Co-authored-by: Gwynne Raskind <[email protected]>
  • Loading branch information
fpseverino and gwynne authored Apr 15, 2024
1 parent 60cf1bf commit b6c3083
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions Sources/PassKit/PassKit.swift
Original file line number Diff line number Diff line change
Expand Up @@ -504,11 +504,7 @@ public final class PassKitCustom<P, D, R: PassKitRegistration, E: PassKitErrorLo
let encoder = JSONEncoder()

let src = try await delegate.template(for: pass, db: db)
var isDir: ObjCBool = false

guard src.hasDirectoryPath &&
FileManager.default.fileExists(atPath: src.unixPath(), isDirectory: &isDir) &&
isDir.boolValue else {
guard (try? src.resourceValues(forKeys: [.isDirectoryKey]).isDirectory) ?? false else {
throw PassKitError.templateNotDirectory
}

Expand Down

0 comments on commit b6c3083

Please sign in to comment.