diff --git a/ScreenSaver/Caching.cs b/ScreenSaver/Caching.cs index 2c40ed5..4f1dabe 100644 --- a/ScreenSaver/Caching.cs +++ b/ScreenSaver/Caching.cs @@ -17,7 +17,7 @@ public class Caching internal static void Setup() { // If there is no location stored in the Registry, use the default location - if (CacheFolder == null) + if (CacheFolder == null || CacheFolder == "") { CacheFolder = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), "Aerial"); } diff --git a/ScreenSaver/RegSettings.cs b/ScreenSaver/RegSettings.cs index 4de977c..6791e95 100644 --- a/ScreenSaver/RegSettings.cs +++ b/ScreenSaver/RegSettings.cs @@ -1,4 +1,6 @@ using Microsoft.Win32; +using System; +using System.IO; namespace ScreenSaver { @@ -9,7 +11,7 @@ public class RegSettings public bool UseTimeOfDay = true; public bool MultiscreenDisabled = true; public bool CacheVideos = true; - public string CacheLocation = ""; + public string CacheLocation = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), "Aerial"); public RegSettings() { diff --git a/ScreenSaver/SettingsForm.cs b/ScreenSaver/SettingsForm.cs index 33808d1..2e2c38a 100644 --- a/ScreenSaver/SettingsForm.cs +++ b/ScreenSaver/SettingsForm.cs @@ -23,7 +23,7 @@ private void LoadSettings() chkMultiscreenDisabled.Checked = settings.MultiscreenDisabled; chkCacheVideos.Checked = settings.CacheVideos; - if(settings.CacheLocation == null) + if(settings.CacheLocation == null || settings.CacheLocation == "") { txtCacheFolderPath.Text = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), "Aerial").ToString(); }