Mercurial > urweb
comparison src/settings.sml @ 2135:a159625975a7
Allow file directives to contain slashes
Previously, adding a line such as "file /c/foo.css css/foo.css" would
cause the compiler to raise an InvalidArc exception.
author | Julian Squires <julian@cipht.net> |
---|---|
date | Fri, 24 Apr 2015 07:51:47 -0400 |
parents | e8863d9f8c59 |
children | 3b4a5604ed97 a07b91fa71db |
comparison
equal
deleted
inserted
replaced
2134:752e5efe9da9 | 2135:a159625975a7 |
---|---|
874 | 874 |
875 fun setFilePath path = filePath := path | 875 fun setFilePath path = filePath := path |
876 | 876 |
877 fun addFile {Uri, LoadFromFilename} = | 877 fun addFile {Uri, LoadFromFilename} = |
878 let | 878 let |
879 val path = OS.Path.mkAbsolute {relativeTo = !filePath, path = LoadFromFilename} | 879 val path = OS.Path.concat (!filePath, LoadFromFilename) |
880 in | 880 in |
881 case SM.find (!files, Uri) of | 881 case SM.find (!files, Uri) of |
882 SOME (path', _) => | 882 SOME (path', _) => |
883 if path' = path then | 883 if path' = path then |
884 () | 884 () |