From 051309d98bf9801993aa22737dbaaa287938fe7c Mon Sep 17 00:00:00 2001 From: Maurice Parker Date: Thu, 4 Feb 2021 21:50:03 -0600 Subject: [PATCH] Fix pathing problem with icon image urls --- Shared/Extensions/ArticleUtilities.swift | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Shared/Extensions/ArticleUtilities.swift b/Shared/Extensions/ArticleUtilities.swift index 6f6cd5126..6d9f23963 100644 --- a/Shared/Extensions/ArticleUtilities.swift +++ b/Shared/Extensions/ArticleUtilities.swift @@ -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