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

Unified Diff: grit/node/misc.py

Issue 11312072: Fix grit to substitute GRIT_DIR properly on Windows. (Closed) Base URL: https://grit-i18n.googlecode.com/svn/trunk
Patch Set: Created 8 years, 1 month 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: grit/node/misc.py
diff --git a/grit/node/misc.py b/grit/node/misc.py
index 2f6935198a0a6e81544587886dc1d47c90bd1655..40a4065b6bff4c446db9debd3896c464ed6473cb 100755
--- a/grit/node/misc.py
+++ b/grit/node/misc.py
@@ -328,9 +328,10 @@ class GritNode(base.Node):
return None
path = self.attrs['first_ids_file']
- GRIT_DIR_PREFIX = 'GRIT_DIR/'
- if path.startswith(GRIT_DIR_PREFIX):
- return util.PathFromRoot(path[len(GRIT_DIR_PREFIX):])
+ GRIT_DIR_PREFIX = 'GRIT_DIR'
+ if (path.startswith(GRIT_DIR_PREFIX)
+ and path[len(GRIT_DIR_PREFIX)] in ['/', '\\']):
+ return util.PathFromRoot(path[len(GRIT_DIR_PREFIX) + 1:])
else:
return self.ToRealPath(path)
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698