aboutsummaryrefslogtreecommitdiff
path: root/src/util.lisp
diff options
context:
space:
mode:
Diffstat (limited to 'src/util.lisp')
-rw-r--r--src/util.lisp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/util.lisp b/src/util.lisp
index 9dd417d..1dd2b44 100644
--- a/src/util.lisp
+++ b/src/util.lisp
@@ -167,6 +167,11 @@ one solution is to convert your property to a :LISP property."
(namestring
(enough-pathname pathname (pathname-directory-pathname pathname)))))
+(defun ensure-trailing-slash (namestring)
+ (if (string-suffix-p namestring "/")
+ namestring
+ (strcat namestring "/")))
+
(defun drop-trailing-slash (namestring)
(if (string-suffix-p namestring "/")
(subseq namestring 0 (1- (length namestring)))