Skip to content

Commit

Permalink
Resolve TODO
Browse files Browse the repository at this point in the history
  • Loading branch information
mono0926 committed May 15, 2017
1 parent dd0dc6d commit 9a87ad4
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions Sources/LicensePlistCore/Entity/LicensePlistHolder.swift
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,13 @@ struct LicensePlistHolder {
return (root: root, items: items)
}
func write(to rootPath: URL, itemsPath: URL) {
// TODO: エラー
try! root.write(to: rootPath)
items.forEach {
try! $0.1.write(to: itemsPath.appendingPathComponent("\($0.0.name).plist"))
do {
try root.write(to: rootPath)
try items.forEach {
try $0.1.write(to: itemsPath.appendingPathComponent("\($0.0.name).plist"))
}
} catch let e {
Log.error("Failed to write to (rootPath: \(rootPath), itemsPath: \(itemsPath)).\nerror: \(e)")
}

}
Expand Down

0 comments on commit 9a87ad4

Please sign in to comment.