The Free Software Media System - Server Backend & API
add platform test to directory picker
Luke Pulverenti7d980fee4595
diff --git a/MediaBrowser.Api/EnvironmentService.cs b/MediaBrowser.Api/EnvironmentService.csindex e137a4baf9..b354cb26c2 100644--- a/MediaBrowser.Api/EnvironmentService.cs+++ b/MediaBrowser.Api/EnvironmentService.cs@@ -134,17 +134,20 @@ namespace MediaBrowser.Api{var result = new DefaultDirectoryBrowserInfo();- try+ if (Environment.OSVersion.Platform == PlatformID.Unix){- var qnap = "/share/CACHEDEV1_DATA";- if (Directory.Exists(qnap))+ try{- result.Path = qnap;+ var qnap = "/share/CACHEDEV1_DATA";+ if (Directory.Exists(qnap))+ {+ result.Path = qnap;+ }+ }+ catch+ {+}- }- catch- {-}return ToOptimizedResult(result);