From 42b14166029d5251e952b72f5c16cd9ae96aa8cb Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Mon, 22 Dec 2014 22:58:14 -0500 Subject: begin work on daily episodes --- .../Configuration/BaseConfigurationManager.cs | 4 ++++ MediaBrowser.Common.Implementations/Devices/DeviceId.cs | 5 ++++- MediaBrowser.Common.Implementations/Security/MBLicenseFile.cs | 4 ++++ 3 files changed, 12 insertions(+), 1 deletion(-) (limited to 'MediaBrowser.Common.Implementations') diff --git a/MediaBrowser.Common.Implementations/Configuration/BaseConfigurationManager.cs b/MediaBrowser.Common.Implementations/Configuration/BaseConfigurationManager.cs index 89f6229ace..c53947e443 100644 --- a/MediaBrowser.Common.Implementations/Configuration/BaseConfigurationManager.cs +++ b/MediaBrowser.Common.Implementations/Configuration/BaseConfigurationManager.cs @@ -223,6 +223,10 @@ namespace MediaBrowser.Common.Implementations.Configuration { return Activator.CreateInstance(configurationType); } + catch (DirectoryNotFoundException) + { + return Activator.CreateInstance(configurationType); + } catch (Exception ex) { Logger.ErrorException("Error loading configuration file: {0}", ex, path); diff --git a/MediaBrowser.Common.Implementations/Devices/DeviceId.cs b/MediaBrowser.Common.Implementations/Devices/DeviceId.cs index 5af236026e..7c0dc1e1f0 100644 --- a/MediaBrowser.Common.Implementations/Devices/DeviceId.cs +++ b/MediaBrowser.Common.Implementations/Devices/DeviceId.cs @@ -38,7 +38,10 @@ namespace MediaBrowser.Common.Implementations.Devices _logger.Error("Invalid value found in device id file"); } } - catch (FileNotFoundException ex) + catch (DirectoryNotFoundException) + { + } + catch (FileNotFoundException) { } catch (Exception ex) diff --git a/MediaBrowser.Common.Implementations/Security/MBLicenseFile.cs b/MediaBrowser.Common.Implementations/Security/MBLicenseFile.cs index 8f3225f4e9..63381efcdf 100644 --- a/MediaBrowser.Common.Implementations/Security/MBLicenseFile.cs +++ b/MediaBrowser.Common.Implementations/Security/MBLicenseFile.cs @@ -101,6 +101,10 @@ namespace MediaBrowser.Common.Implementations.Security { contents = File.ReadAllLines(licenseFile); } + catch (DirectoryNotFoundException) + { + (File.Create(licenseFile)).Close(); + } catch (FileNotFoundException) { (File.Create(licenseFile)).Close(); -- cgit v1.2.3