Skip to content

Commit 0ed4243

Browse files
author
Kai Koehne
committed
FIXUP fix shadow build with source and build dir on different Windows
Leave the paths in grd_reader.py alone. They will always be in the source directory anyway, and the result will be compared to the list of registered strings. Change-Id: If72fd825cc37988e4e1af02800c41880d56c8525 Reviewed-by: Joerg Bornemann <[email protected]>
1 parent 6927241 commit 0ed4243

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

chromium/tools/grit/grit/grd_reader.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -138,11 +138,6 @@ def ignorableWhitespace(self, whitespace):
138138
self.parent.ignorableWhitespace(whitespace)
139139

140140

141-
def maybeRelativePath(path, start):
142-
if os.path.splitdrive(path)[0] == os.path.splitdrive(start)[0]:
143-
return os.path.relpath(path, start)
144-
return path
145-
146141
def Parse(filename_or_stream, dir=None, stop_after=None, first_ids_file=None,
147142
debug=False, defines=None, tags_to_ignore=None, target_platform=None):
148143
'''Parses a GRD file into a tree of nodes (from grit.node).
@@ -212,7 +207,7 @@ def Parse(filename_or_stream, dir=None, stop_after=None, first_ids_file=None,
212207
GRIT_DIR_PREFIX = 'GRIT_DIR'
213208
if not (first_ids_file.startswith(GRIT_DIR_PREFIX)
214209
and first_ids_file[len(GRIT_DIR_PREFIX)] in ['/', '\\']):
215-
rel_dir = maybeRelativePath(os.getcwd(), dir)
210+
rel_dir = os.path.relpath(os.getcwd(), dir)
216211
first_ids_file = util.normpath(os.path.join(rel_dir, first_ids_file))
217212
handler.root.attrs['first_ids_file'] = first_ids_file
218213
# Assign first ids to the nodes that don't have them.

0 commit comments

Comments
 (0)