summaryrefslogtreecommitdiff
path: root/scheme/racket
diff options
context:
space:
mode:
Diffstat (limited to 'scheme/racket')
-rw-r--r--scheme/racket/geiser/modules.rkt5
1 files changed, 3 insertions, 2 deletions
diff --git a/scheme/racket/geiser/modules.rkt b/scheme/racket/geiser/modules.rkt
index 0de316c..95219ed 100644
--- a/scheme/racket/geiser/modules.rkt
+++ b/scheme/racket/geiser/modules.rkt
@@ -90,8 +90,9 @@
(let ((ext (filename-extension path)))
(and ext
(or (bytes=? ext #"rkt") (bytes=? ext #"ss"))
- (let ((path (path->string path)))
- (substring path 0 (- (string-length path) 3))))))
+ (let* ((path (path->string path))
+ (len (- (string-length path) (bytes-length ext) 1)))
+ (substring path 0 len)))))
(define (visit-module-path path kind acc)
(case kind