mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2025-08-12 06:26:36 +00:00
Fix pathing problem with icon image urls
This commit is contained in:
@@ -107,10 +107,11 @@ extension Article {
|
||||
if let image = iconImage() {
|
||||
let fm = FileManager.default
|
||||
var path = fm.urls(for: .cachesDirectory, in: .userDomainMask)[0]
|
||||
let feedID = webFeed.webFeedID.replacingOccurrences(of: "/", with: "_")
|
||||
#if os(macOS)
|
||||
path.appendPathComponent(webFeed.webFeedID + "_smallIcon.tiff")
|
||||
path.appendPathComponent(feedID + "_smallIcon.tiff")
|
||||
#else
|
||||
path.appendPathComponent(webFeed.webFeedID + "_smallIcon.png")
|
||||
path.appendPathComponent(feedID + "_smallIcon.png")
|
||||
#endif
|
||||
fm.createFile(atPath: path.path, contents: image.image.dataRepresentation()!, attributes: nil)
|
||||
return path
|
||||
|
||||
Reference in New Issue
Block a user