File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed
Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -27,6 +27,14 @@ public static string NormalizePath(string path)
2727 return path . Replace ( '\\ ' , '/' ) ;
2828 }
2929
30+ /// <summary>
31+ /// Ensures that the specified path ends with a trailing forward slash "/"
32+ /// </summary>
33+ public static string EnsureTrailingSlash ( string baseHost )
34+ {
35+ return baseHost . TrimEnd ( '/' ) + '/' ;
36+ }
37+
3038 /// <summary>
3139 /// Combines a base URL path and a file path into a single URL
3240 /// </summary>
Original file line number Diff line number Diff line change @@ -97,7 +97,7 @@ public void Parse(Ini file)
9797 var server = mainSection . Get ( "UpdateServer" , string . Empty ) ;
9898 if ( ! string . IsNullOrEmpty ( server ) )
9999 {
100- if ( Uri . TryCreate ( server , UriKind . Absolute , out Uri ? uri ) )
100+ if ( Uri . TryCreate ( Helpers . EnsureTrailingSlash ( server ) , UriKind . Absolute , out Uri ? uri ) )
101101 {
102102 Updater = new UpdateSourceMulti ( this , uri ) ;
103103 }
You can’t perform that action at this time.
0 commit comments