Skip to content

Commit 90ec95d

Browse files
committed
Prevent directories from shadowing notebook paths
1 parent fc6df71 commit 90ec95d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/nextjournal/clerk/webserver.clj

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,8 @@
197197
(defn maybe-add-extension [nav-path]
198198
(if (and (string? nav-path)
199199
(or (str/starts-with? nav-path "'")
200-
(fs/exists? nav-path)))
200+
(and (fs/exists? nav-path)
201+
(not (fs/directory? nav-path)))))
201202
nav-path
202203
(find-first-existing-file (map #(str (fs/file nav-path) "." %) ["md" "clj" "cljc"]))))
203204

0 commit comments

Comments
 (0)