diff options
| author | Bond-009 <bond.009@outlook.com> | 2019-12-18 11:53:41 +0100 |
|---|---|---|
| committer | Bond-009 <bond.009@outlook.com> | 2019-12-18 11:53:41 +0100 |
| commit | a1ca50fd5a74eafa6e609976d90cad42b54137e5 (patch) | |
| tree | 9c64d6914c27a8d7e2f8e6f71d7a5952197705cf /MediaBrowser.Model/Configuration/ServerConfiguration.cs | |
| parent | 8723bdbb4fb73ed261ac1ba3b6932773e523d78b (diff) | |
| parent | 6b185119aa329764c1ccc57d9be3e81f05680b69 (diff) | |
Merge branch 'namingtests' of https://github.com/Bond-009/jellyfin into namingtests
Diffstat (limited to 'MediaBrowser.Model/Configuration/ServerConfiguration.cs')
| -rw-r--r-- | MediaBrowser.Model/Configuration/ServerConfiguration.cs | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/MediaBrowser.Model/Configuration/ServerConfiguration.cs b/MediaBrowser.Model/Configuration/ServerConfiguration.cs index b8abe49e3..9de6fef61 100644 --- a/MediaBrowser.Model/Configuration/ServerConfiguration.cs +++ b/MediaBrowser.Model/Configuration/ServerConfiguration.cs @@ -172,16 +172,18 @@ namespace MediaBrowser.Model.Configuration if (string.IsNullOrWhiteSpace(value)) { // If baseUrl is empty, set an empty prefix string - value = string.Empty; + _baseUrl = string.Empty; + return; } - else if (!value.StartsWith("/")) + + if (value[0] != '/') { // If baseUrl was not configured with a leading slash, append one for consistency value = "/" + value; } // Normalize the end of the string - if (value.EndsWith("/")) + if (value[value.Length - 1] == '/') { // If baseUrl was configured with a trailing slash, remove it for consistency value = value.Remove(value.Length - 1); |
