From 7cd41a6ed62c46006307add9de92e0b329bd0edc Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Fri, 21 Feb 2014 00:04:11 -0500 Subject: easier user library setup --- .../Library/UserManager.cs | 30 ++++++---------------- 1 file changed, 8 insertions(+), 22 deletions(-) (limited to 'MediaBrowser.Server.Implementations/Library/UserManager.cs') 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 -- cgit v1.2.3