فهرست منبع

fixed config save

Luke Pulverenti 12 سال پیش
والد
کامیت
98e8b73d81
1فایلهای تغییر یافته به همراه4 افزوده شده و 2 حذف شده
  1. 4 2
      MediaBrowser.Server.Implementations/Configuration/ServerConfigurationManager.cs

+ 4 - 2
MediaBrowser.Server.Implementations/Configuration/ServerConfigurationManager.cs

@@ -84,10 +84,12 @@ namespace MediaBrowser.Server.Implementations.Configuration
         {
         {
             var newConfig = (ServerConfiguration) newConfiguration;
             var newConfig = (ServerConfiguration) newConfiguration;
 
 
-            if (!string.Equals(Configuration.ItemsByNamePath, newConfig.ItemsByNamePath))
+            var newIbnPath = newConfig.ItemsByNamePath ?? string.Empty;
+
+            if (!string.Equals(Configuration.ItemsByNamePath ?? string.Empty, newIbnPath))
             {
             {
                 // Validate
                 // Validate
-                if (!Directory.Exists(newConfig.ItemsByNamePath))
+                if (!Directory.Exists(newIbnPath))
                 {
                 {
                     throw new DirectoryNotFoundException(string.Format("{0} does not exist.", newConfig.ItemsByNamePath));
                     throw new DirectoryNotFoundException(string.Format("{0} does not exist.", newConfig.ItemsByNamePath));
                 }
                 }