diff src/demo.sml @ 943:e2194a6793ae

Fix JavaScript char literals; don't generate demo links to nonexistent files
author Adam Chlipala <adamc@hcoop.net>
date Tue, 15 Sep 2009 13:07:57 -0400
parents 8f2159040bbb
children 93315ac00394
line wrap: on
line diff
--- a/src/demo.sml	Tue Sep 15 12:41:54 2009 -0400
+++ b/src/demo.sml	Tue Sep 15 13:07:57 2009 -0400
@@ -197,7 +197,8 @@
                                                                         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>");