From 22ec7d670a236d0ae8ad029a5f039acc617002f6 Mon Sep 17 00:00:00 2001 From: Brent Simmons Date: Sat, 25 Nov 2017 11:14:06 -0800 Subject: [PATCH] =?UTF-8?q?Use=20temp=20directory=20for=20favicons,=20so?= =?UTF-8?q?=20they=E2=80=99ll=20automatically=20get=20cleaned=20up=20by=20?= =?UTF-8?q?the=20system.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Evergreen/AppDelegate.swift | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Evergreen/AppDelegate.swift b/Evergreen/AppDelegate.swift index 611d6a41d..c401766f0 100644 --- a/Evergreen/AppDelegate.swift +++ b/Evergreen/AppDelegate.swift @@ -122,7 +122,10 @@ class AppDelegate: NSObject, NSApplicationDelegate, NSUserInterfaceValidations, currentTheme = themeLoader.defaultTheme - let faviconsFolder = RSDataSubfolder(nil, "Favicons")! + let tempDirectory = NSTemporaryDirectory() + let faviconsFolder = (tempDirectory as NSString).appendingPathComponent("Favicons") + let faviconsFolderURL = URL(fileURLWithPath: faviconsFolder) + try! FileManager.default.createDirectory(at: faviconsFolderURL, withIntermediateDirectories: true, attributes: nil) faviconDownloader = FaviconDownloader(folder: faviconsFolder) let todayFeed = SmartFeed(delegate: TodayFeedDelegate()) @@ -414,7 +417,7 @@ class AppDelegate: NSObject, NSApplicationDelegate, NSUserInterfaceValidations, @IBAction func debugDropConditionalGetInfo(_ sender: Any?) { #if DEBUG - print("debug") + AccountManager.shared.accounts.forEach{ $0.debugDropConditionalGetInfo() } #endif } }