summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authoreltrac <hi@eltr.ac>2026-10-13 14:59:21 +0800
committereltrac <hi@eltr.ac>2026-10-13 14:59:21 +0800
commitfdb8d750ee5ce2767d0368686200b82b880b27c1 (patch)
tree8f37d30139940ba41498b156891708da3598e2f9 /src
parente0d315707b6521a58c1a8942167843412b6ac95c (diff)
utils.url: fix not removing trailing slash of a root path URL
Diffstat (limited to 'src')
-rw-r--r--src/weepinbell/utils/url.clj2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/weepinbell/utils/url.clj b/src/weepinbell/utils/url.clj
index 5daf292..a0de304 100644
--- a/src/weepinbell/utils/url.clj
+++ b/src/weepinbell/utils/url.clj
@@ -29,7 +29,7 @@
(defn- normlaize-path [^String path*]
(let [path (or path* "")
- deslashed (if (and (> (count path) 1) (.endsWith path "/"))
+ deslashed (if (and (pos? (count path)) (.endsWith path "/"))
(subs path 0 (dec (count path)))
path)]
(str (.normalize (URI. deslashed)))))