aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/demo.sml
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adamc@hcoop.net>2009-09-15 13:07:57 -0400
committerGravatar Adam Chlipala <adamc@hcoop.net>2009-09-15 13:07:57 -0400
commit8e944e62818045b820f45776a396bc1b66ab3056 (patch)
tree2790236bfd930177b19eec97fc9ac1d47e9dd7d4 /src/demo.sml
parent69bdeb0e79c7b33260111c6c6eae332d37d28d0e (diff)
Fix JavaScript char literals; don't generate demo links to nonexistent files
Diffstat (limited to 'src/demo.sml')
-rw-r--r--src/demo.sml3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/demo.sml b/src/demo.sml
index ebdf4e40..4e2caa99 100644
--- a/src/demo.sml
+++ b/src/demo.sml
@@ -197,7 +197,8 @@ fun make {prefix, dirname, guided} =
ext = SOME s}
val src' = OS.Path.file src
in
- if OS.FileSys.access (src, []) then
+ if String.isPrefix (OS.Path.mkCanonical dirname) src
+ andalso OS.FileSys.access (src, []) then
(TextIO.output (out, " | <a target=\"showcase\" href=\"");
TextIO.output (out, src');
TextIO.output (out, ".html\"><tt>");