diff options
| author | Andrew Rabert <6550543+nvllsvm@users.noreply.github.com> | 2019-06-24 12:54:24 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-06-24 12:54:24 -0400 |
| commit | fc439cc02a1c1ca19635adaadad0570f4dc5e22e (patch) | |
| tree | a83dcfe0f58ecfd0c45feeca8b706c908cf1098a | |
| parent | 1b2621cd30eb22ce6fbc8b94175ce8f5fce0330f (diff) | |
| parent | d1d0ddf62f75d7b49aa3f585d3ad8e54821d2d04 (diff) | |
Merge pull request #1448 from joshuaboniface/nice-userconfig-paths
Use the username for the user config path
| -rw-r--r-- | MediaBrowser.Controller/Entities/User.cs | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/MediaBrowser.Controller/Entities/User.cs b/MediaBrowser.Controller/Entities/User.cs index 0d5f508dd..9952ba418 100644 --- a/MediaBrowser.Controller/Entities/User.cs +++ b/MediaBrowser.Controller/Entities/User.cs @@ -228,7 +228,15 @@ namespace MediaBrowser.Controller.Entities return System.IO.Path.Combine(ConfigurationManager.ApplicationPaths.UserConfigurationDirectoryPath, safeFolderName); } - return System.IO.Path.Combine(parentPath, Id.ToString("N")); + // TODO: Remove idPath and just use usernamePath for future releases + var usernamePath = System.IO.Path.Combine(parentPath, username); + var idPath = System.IO.Path.Combine(parentPath, Id.ToString("N")); + if (!Directory.Exists(usernamePath) && Directory.Exists(idPath)) + { + Directory.Move(idPath, usernamePath); + } + + return usernamePath; } public bool IsParentalScheduleAllowed() |
