From a6c0253e65ee842055a9f875b459f3f56f612908 Mon Sep 17 00:00:00 2001 From: Matthew Butterick Date: Mon, 29 Oct 2018 10:51:50 -0700 Subject: [PATCH] whoops --- sugar/file.rkt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sugar/file.rkt b/sugar/file.rkt index 2b048da..f3d1251 100644 --- a/sugar/file.rkt +++ b/sugar/file.rkt @@ -9,8 +9,8 @@ ;; but will not treat hidden files as an extension (which is a bug) (define (filename-extension name) (define filename (file-name-from-path name)) - (define bytes (and name (path->bytes filename))) - (match (and name (regexp-match #rx#".[.]([^.]+)$" bytes)) + (define bytes (and filename (path->bytes filename))) + (match (and bytes (regexp-match #rx#".[.]([^.]+)$" bytes)) [(list _ second) second] [_ #false]))