Chromium Code Reviews| Index: client/dom/scripts/systembase.py |
| diff --git a/client/dom/scripts/systembase.py b/client/dom/scripts/systembase.py |
| index 56d0db3b6c805b00333d8f9f30b770eeae61fc5e..67dab535a0de2b812ed88a1f9a2870dc4c1662d1 100644 |
| --- a/client/dom/scripts/systembase.py |
| +++ b/client/dom/scripts/systembase.py |
| @@ -10,6 +10,10 @@ import os |
| #import re |
| import generator |
| +def EscapePath(path): |
|
podivilov
2012/03/02 10:36:18
Please rename to FixDartPathSeparators or somethin
antonm
2012/03/02 10:41:53
Done.
|
| + # The most robust way to emit path separators is to use / always. |
| + return path.replace('\\', '/') |
| + |
| class System(object): |
| """A System generates all the files for one implementation. |
| @@ -81,7 +85,7 @@ class System(object): |
| lib_file_dir = os.path.dirname(lib_file_path) |
| for path in sorted(file_paths): |
| relpath = os.path.relpath(path, lib_file_dir) |
| - list_emitter.Emit("#source('$PATH');\n", PATH=relpath) |
| + list_emitter.Emit("#source('$PATH');\n", PATH=EscapePath(relpath)) |
| def _BaseDefines(self, interface): |