easier user library setup

This commit is contained in:
Luke Pulverenti
2014-02-21 00:04:11 -05:00
parent a91c676565
commit 7cd41a6ed6
17 changed files with 863 additions and 1068 deletions

View File

@@ -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
{
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);
}
File.Delete(path);
}
catch (IOException ex)
{
_logger.ErrorException("Error deleting file {0}", ex, path);
}
// Force this to be lazy loaded again