utils: file-name-components: Handle empty string.
* haunt/utils.scm (file-name-components): Return the empty list when given the empty string.
This commit is contained in:
parent
2f6b06dd22
commit
19a26608f2
|
@ -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."
|
||||
|
|
Loading…
Reference in New Issue