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

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: 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..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):
« 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