diff options
Diffstat (limited to 'MediaBrowser.Server.Implementations/Library/UserManager.cs')
| -rw-r--r-- | MediaBrowser.Server.Implementations/Library/UserManager.cs | 30 |
1 files changed, 8 insertions, 22 deletions
diff --git a/MediaBrowser.Server.Implementations/Library/UserManager.cs b/MediaBrowser.Server.Implementations/Library/UserManager.cs index ce76dd21b..8654a26ce 100644 --- a/MediaBrowser.Server.Implementations/Library/UserManager.cs +++ b/MediaBrowser.Server.Implementations/Library/UserManager.cs @@ -332,29 +332,15 @@ namespace MediaBrowser.Server.Implementations.Library await UserRepository.DeleteUser(user, CancellationToken.None).ConfigureAwait(false); - if (user.Configuration.UseCustomLibrary) + var path = user.ConfigurationFilePath; + + try + { + File.Delete(path); + } + catch (IOException ex) { - var path = user.RootFolderPath; - - try - { - Directory.Delete(path, true); - } - catch (IOException ex) - { - _logger.ErrorException("Error deleting directory {0}", ex, path); - } - - path = user.ConfigurationFilePath; - - try - { - File.Delete(path); - } - catch (IOException ex) - { - _logger.ErrorException("Error deleting file {0}", ex, path); - } + _logger.ErrorException("Error deleting file {0}", ex, path); } // Force this to be lazy loaded again |
