diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2014-02-21 00:04:11 -0500 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2014-02-21 00:04:11 -0500 |
| commit | 7cd41a6ed62c46006307add9de92e0b329bd0edc (patch) | |
| tree | f8d6515c218db6be90028f3fc7bacd549a0dab8f /MediaBrowser.Server.Implementations/Library/UserManager.cs | |
| parent | a91c676565579c0ce7f7954e89a2b57a5c6c5780 (diff) | |
easier user library setup
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 |
