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

Unified Diff: tools/grit/grit/node/include.py

Issue 28222: Fix a bug where the flattened HTML file was not getting (Closed)
Patch Set: Created 11 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/grit/grit/node/include.py
diff --git a/tools/grit/grit/node/include.py b/tools/grit/grit/node/include.py
index 032674bdd2f9a13924d8a43ca5de1337f72b9eb9..e9ea31cad7947a39499bbed935fd8bb0b4f49fc9 100644
--- a/tools/grit/grit/node/include.py
+++ b/tools/grit/grit/node/include.py
@@ -57,10 +57,9 @@ class IncludeNode(base.Node):
id_map = rc_header.Item.tids_
id = id_map[self.GetTextualIds()[0]]
filename = self.FilenameToOpen()
- if not os.path.exists(filename):
- # Try to open the file relative to the output dir if it's not relative to
- # the grd file.
- filename = os.path.join(output_dir, self.attrs['file'])
+ if self.attrs['flattenhtml'] == 'true':
+ # If the file was flattened, the flattened file is in the output dir.
+ filename = os.path.join(output_dir, os.path.split(filename)[1])
file = open(filename, 'rb')
data = file.read()
« 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