Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
path not absoluteString
  • Loading branch information
paulb777 committed Mar 7, 2020
commit 550c8939e181c161993fb2f70a650ccbf4d5ed96
10 changes: 5 additions & 5 deletions ZipBuilder/Sources/ZipBuilder/FrameworkBuilder.swift
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ struct FrameworkBuilder {
var actualFramework: String
do {
let files = try FileManager.default.contentsOfDirectory(at: frameworkPath,
includingPropertiesForKeys: nil).compactMap { $0.absoluteString }
includingPropertiesForKeys: nil).compactMap { $0.path }
let frameworkDir = files.filter { $0.contains(".framework") }
actualFramework = URL(fileURLWithPath: frameworkDir[0]).lastPathComponent
} catch {
Expand Down Expand Up @@ -440,7 +440,7 @@ struct FrameworkBuilder {
var umbrellaHeaderURL: URL
do {
let files = try fileManager.contentsOfDirectory(at: headersDir,
includingPropertiesForKeys: nil).compactMap { $0.absoluteString }
includingPropertiesForKeys: nil).compactMap { $0.path }
let umbrellas = files.filter { $0.hasSuffix("umbrella.h") }
if umbrellas.count != 1 {
fatalError("Did not find exactly one umbrella header in \(headersDir).")
Expand Down Expand Up @@ -603,8 +603,8 @@ struct FrameworkBuilder {
let moduleDir = frameworkDir.appendingPathComponent("Modules").resolvingSymlinksInPath()
do {
let files = try fileManager.contentsOfDirectory(at: moduleDir,
includingPropertiesForKeys: nil).compactMap { $0.absoluteString }
let swiftModules = files.filter { $0.hasSuffix(".swiftmodule/") }
includingPropertiesForKeys: nil).compactMap { $0.path }
let swiftModules = files.filter { $0.hasSuffix(".swiftmodule") }
if swiftModules.isEmpty {
return false
}
Expand All @@ -624,7 +624,7 @@ struct FrameworkBuilder {
// from the *.swiftmodule subdirectory.
do {
let files = try fileManager.contentsOfDirectory(at: swiftModule,
includingPropertiesForKeys: nil).compactMap { $0.absoluteString }
includingPropertiesForKeys: nil).compactMap { $0.path }
let destSwiftModuleDir = destModuleDir.appendingPathComponent(swiftModule.lastPathComponent)
for file in files {
let fileURL = URL(fileURLWithPath: file)
Expand Down