diff options
| author | eltrac <hi@eltr.ac> | 2026-10-13 14:59:21 +0800 |
|---|---|---|
| committer | eltrac <hi@eltr.ac> | 2026-10-13 14:59:21 +0800 |
| commit | fdb8d750ee5ce2767d0368686200b82b880b27c1 (patch) | |
| tree | 8f37d30139940ba41498b156891708da3598e2f9 /src | |
| parent | e0d315707b6521a58c1a8942167843412b6ac95c (diff) | |
utils.url: fix not removing trailing slash of a root path URL
Diffstat (limited to 'src')
| -rw-r--r-- | src/weepinbell/utils/url.clj | 2 |
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)))))
|
