diff options
Diffstat (limited to '')
| -rw-r--r-- | src/copyparty/mod.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/copyparty/mod.rs b/src/copyparty/mod.rs index a9f7d01..d3620b2 100644 --- a/src/copyparty/mod.rs +++ b/src/copyparty/mod.rs | |||
| @@ -147,8 +147,9 @@ pub struct UploadResponse { | |||
| 147 | impl CopypartyClient { | 147 | impl CopypartyClient { |
| 148 | pub fn new(base_url: String, upload_url: String, password: Option<String>) -> Self { | 148 | pub fn new(base_url: String, upload_url: String, password: Option<String>) -> Self { |
| 149 | Self { | 149 | Self { |
| 150 | base_url, | 150 | // A trailing slash would produce `//` when a path is appended. |
| 151 | upload_url, | 151 | base_url: base_url.trim_end_matches('/').to_string(), |
| 152 | upload_url: upload_url.trim_end_matches('/').to_string(), | ||
| 152 | password, | 153 | password, |
| 153 | client: Client::new(), | 154 | client: Client::new(), |
| 154 | } | 155 | } |
