aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Controller/Entities/User.cs
diff options
context:
space:
mode:
Diffstat (limited to 'MediaBrowser.Controller/Entities/User.cs')
-rw-r--r--MediaBrowser.Controller/Entities/User.cs6
1 files changed, 6 insertions, 0 deletions
diff --git a/MediaBrowser.Controller/Entities/User.cs b/MediaBrowser.Controller/Entities/User.cs
index 06f50e552..a2c7bcb57 100644
--- a/MediaBrowser.Controller/Entities/User.cs
+++ b/MediaBrowser.Controller/Entities/User.cs
@@ -58,6 +58,7 @@ namespace MediaBrowser.Controller.Entities
/// Gets or sets the path.
/// </summary>
/// <value>The path.</value>
+ [IgnoreDataMember]
public override string Path
{
get
@@ -267,6 +268,11 @@ namespace MediaBrowser.Controller.Entities
/// <returns>System.String.</returns>
private string GetConfigurationDirectoryPath(string username)
{
+ if (string.IsNullOrEmpty(username))
+ {
+ throw new ArgumentNullException("username");
+ }
+
var safeFolderName = FileSystem.GetValidFilename(username);
return System.IO.Path.Combine(ConfigurationManager.ApplicationPaths.UserConfigurationDirectoryPath, safeFolderName);