aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/copyparty/mod.rs5
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 {
147impl CopypartyClient { 147impl 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 }