diff src/compiler.sml @ 1340:caff0a4d5fc1

Allow use of path variables in strings with no slashes
author Adam Chlipala <adam@chlipala.net>
date Tue, 14 Dec 2010 10:59:17 -0500
parents 8c1996489265
children 0a2b630f2463
line wrap: on
line diff
--- a/src/compiler.sml	Tue Dec 14 10:35:52 2010 -0500
+++ b/src/compiler.sml	Tue Dec 14 10:59:17 2010 -0500
@@ -391,12 +391,9 @@
                                 val fname' = Substring.extract (fname, 1, NONE)
                                 val (befor, after) = Substring.splitl (fn ch => ch <> #"/") fname'
                             in
-                                if Substring.isEmpty after then
-                                    fname
-                                else
-                                    case M.find (!pathmap, Substring.string befor) of
-                                        NONE => fname
-                                      | SOME rep => rep ^ Substring.string after
+                                case M.find (!pathmap, Substring.string befor) of
+                                    NONE => fname
+                                  | SOME rep => rep ^ Substring.string after
                             end
                         else
                             fname