Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(118)

Unified Diff: client/dom/scripts/systembase.py

Issue 9585005: Properly escape paths. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Addressing Pavel's comment Created 8 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | client/dom/scripts/systemnative.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: client/dom/scripts/systembase.py
diff --git a/client/dom/scripts/systembase.py b/client/dom/scripts/systembase.py
index 56d0db3b6c805b00333d8f9f30b770eeae61fc5e..c4304b38e482980e0f9ad69b9bce5892a4f8afc2 100644
--- a/client/dom/scripts/systembase.py
+++ b/client/dom/scripts/systembase.py
@@ -10,6 +10,10 @@ import os
#import re
import generator
+def MassagePath(path):
+ # 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=MassagePath(relpath))
def _BaseDefines(self, interface):
« no previous file with comments | « no previous file | client/dom/scripts/systemnative.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698