Merge pull request #1028 from digitalmoksha/master

percent encode the filename used in the delta url, for #995
This commit is contained in:
Kornel authored and GitHub committed 2017-02-08 22:27:17 +00:00
commit 83709f4b30
1 file changed
+1 -1
+1 -1
View File
@@ -142,7 +142,7 @@ func writeAppcast(appcastDestPath: URL, updates: [ArchiveItem]) throws {
}
for delta in update.deltas {
var attributes = [
XMLNode.attribute(withName: "url", stringValue: URL(string: delta.archivePath.lastPathComponent, relativeTo: update.archiveURL)!.absoluteString) as! XMLNode,
XMLNode.attribute(withName: "url", stringValue: URL(string: delta.archivePath.lastPathComponent.addingPercentEncoding(withAllowedCharacters: CharacterSet.urlPathAllowed)!, relativeTo: update.archiveURL)!.absoluteString) as! XMLNode,
XMLNode.attribute(withName: "sparkle:version", uri: sparkleNS, stringValue: update.version) as! XMLNode,
XMLNode.attribute(withName: "sparkle:deltaFrom", uri: sparkleNS, stringValue: delta.fromVersion) as! XMLNode,
XMLNode.attribute(withName: "length", stringValue: String(delta.fileSize)) as! XMLNode,