Update ArchiveItem.swift

When the SUFeedURL extention is "php", replace filename.php with appcast.xml in generate_appcast
This commit is contained in:
Tom Vos committed 2019-08-13 09:45:10 +02:00
1 parent 795ce1278d
commit 28ff3069ff
1 file changed
+4
+4
View File
@@ -94,6 +94,10 @@ class ArchiveItem: CustomStringConvertible {
var feedURL:URL? = nil;
if let feedURLStr = infoPlist["SUFeedURL"] as? String {
feedURL = URL(string: feedURLStr);
if feedURL?.pathExtension == "php" {
let feedFileAndExtention = feedURL?.lastPathComponent + "." + feedURL?.pathExtension as? String
feedURL = URL(string: feedURL?.absoluteString.replacingOccurrences(of: feedFileAndExtention, with: "appcast.xml"))
}
}
try self.init(version: version,