changeset 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 43677a8a20e9
children 91eaa1542c5a
files src/compiler.sml
diffstat 1 files changed, 3 insertions(+), 6 deletions(-) [+]
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