diff options
| author | Luke <luke.pulverenti@gmail.com> | 2017-11-20 13:02:59 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-11-20 13:02:59 -0500 |
| commit | 8f78652398ad4e9e9af53a1bd065afe4b9d9260e (patch) | |
| tree | 32bc4144212d7f6ee3941c9c2471b56ab9c5d3e2 /Emby.Server.Implementations/Library/LibraryManager.cs | |
| parent | 7d15b140cfe4f761e03f661f82cf946f327863f5 (diff) | |
| parent | 71ff88284be60fb39a7389e0c4990c94f2207ed4 (diff) | |
Merge pull request #3032 from MediaBrowser/beta
Beta
Diffstat (limited to 'Emby.Server.Implementations/Library/LibraryManager.cs')
| -rw-r--r-- | Emby.Server.Implementations/Library/LibraryManager.cs | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/Emby.Server.Implementations/Library/LibraryManager.cs b/Emby.Server.Implementations/Library/LibraryManager.cs index bd8a09550..f71e2714a 100644 --- a/Emby.Server.Implementations/Library/LibraryManager.cs +++ b/Emby.Server.Implementations/Library/LibraryManager.cs @@ -709,6 +709,13 @@ namespace Emby.Server.Implementations.Library var rootFolder = GetItemById(GetNewItemId(rootFolderPath, typeof(AggregateFolder))) as AggregateFolder ?? (AggregateFolder)ResolvePath(_fileSystem.GetDirectoryInfo(rootFolderPath)); + // In case program data folder was moved + if (!string.Equals(rootFolder.Path, rootFolderPath, StringComparison.Ordinal)) + { + _logger.Info("Resetting root folder path to {0}", rootFolderPath); + rootFolder.Path = rootFolderPath; + } + // Add in the plug-in folders foreach (var child in PluginFolderCreators) { @@ -771,6 +778,13 @@ namespace Emby.Server.Implementations.Library tmpItem = (UserRootFolder)ResolvePath(_fileSystem.GetDirectoryInfo(userRootPath)); } + // In case program data folder was moved + if (!string.Equals(tmpItem.Path, userRootPath, StringComparison.Ordinal)) + { + _logger.Info("Resetting user root folder path to {0}", userRootPath); + tmpItem.Path = userRootPath; + } + _userRootFolder = tmpItem; } } |
