summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--haunt/utils.scm4
1 files changed, 3 insertions, 1 deletions
diff --git a/haunt/utils.scm b/haunt/utils.scm
index b69dab8..5fd97c7 100644
--- a/haunt/utils.scm
+++ b/haunt/utils.scm
@@ -67,7 +67,9 @@ flattened."
(define (file-name-components file-name)
"Split FILE-NAME into the components delimited by '/'."
- (string-split file-name #\/))
+ (if (string-null? file-name)
+ '()
+ (string-split file-name #\/)))
(define (join-file-name-components components)
"Join COMPONENTS into a file name string."