Index: tools/grit/grit/node/misc.py |
diff --git a/tools/grit/grit/node/misc.py b/tools/grit/grit/node/misc.py |
index 46eae172222c00eb896701f6c9d9ad7c79df0fd3..5bc34b4f89f9a225ec7420ece54bf88ae968d9b7 100644 |
--- a/tools/grit/grit/node/misc.py |
+++ b/tools/grit/grit/node/misc.py |
@@ -34,11 +34,13 @@ def _ReadFirstIdsFromFile(filename, defines): |
# parameter of the .grd file rather than of the resource_ids file. |
src_root_dir = os.path.abspath(os.path.join(os.path.dirname(filename), |
first_ids_dict['SRCDIR'])) |
+ # Special case for testing. |
+ if first_ids_dict['SRCDIR'] == '': |
+ src_root_dir = '' |
Evan Martin
2011/09/22 18:54:39
Would it work to use '.' here? Might make the tes
|
def ReplaceVariable(matchobj): |
for key, value in defines.iteritems(): |
if matchobj.group(1) == key: |
- value = os.path.join(src_root_dir, value) |
value = os.path.abspath(value)[len(src_root_dir) + 1:] |
return value |
return '' |