webclient: fix link for shares with a trailing space

Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
This commit is contained in:
Nicola Murino
2023-10-29 07:33:56 +01:00
parent 116be362ba
commit 59378104b7
2 changed files with 2 additions and 4 deletions

View File

@@ -1503,8 +1503,7 @@ func getShareFromPostFields(r *http.Request) (*dataprovider.Share, error) {
share.Name = strings.TrimSpace(r.Form.Get("name"))
share.Description = r.Form.Get("description")
for _, p := range r.Form["paths"] {
p = strings.TrimSpace(p)
if p != "" {
if strings.TrimSpace(p) != "" {
share.Paths = append(share.Paths, p)
}
}