aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Server.Implementations/Library/LibraryManager.cs
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2013-06-04 12:48:23 -0400
committerLuke Pulverenti <luke.pulverenti@gmail.com>2013-06-04 12:48:23 -0400
commit2e408e40c015b34b365d0e0ef4d7a20fc02b0b80 (patch)
tree99c8ead78374aec26ad993fb94b7b76bb908db92 /MediaBrowser.Server.Implementations/Library/LibraryManager.cs
parent02fedead11f738c09e503c3bdc74e2dd98e21cc8 (diff)
defer path creation when possible
Diffstat (limited to 'MediaBrowser.Server.Implementations/Library/LibraryManager.cs')
-rw-r--r--MediaBrowser.Server.Implementations/Library/LibraryManager.cs6
1 files changed, 6 insertions, 0 deletions
diff --git a/MediaBrowser.Server.Implementations/Library/LibraryManager.cs b/MediaBrowser.Server.Implementations/Library/LibraryManager.cs
index f9c8e9a31..8a19a8d3f 100644
--- a/MediaBrowser.Server.Implementations/Library/LibraryManager.cs
+++ b/MediaBrowser.Server.Implementations/Library/LibraryManager.cs
@@ -558,6 +558,12 @@ namespace MediaBrowser.Server.Implementations.Library
public AggregateFolder CreateRootFolder()
{
var rootFolderPath = ConfigurationManager.ApplicationPaths.RootFolderPath;
+
+ if (!Directory.Exists(rootFolderPath))
+ {
+ Directory.CreateDirectory(rootFolderPath);
+ }
+
var rootFolder = RetrieveItem(rootFolderPath.GetMBId(typeof(AggregateFolder))) as AggregateFolder ?? (AggregateFolder)ResolvePath(rootFolderPath);
// Add in the plug-in folders