diff options
author | 2016-08-08 11:03:49 +0000 | |
---|---|---|
committer | 2016-08-08 11:41:41 +0000 | |
commit | c6bdd390b7ab7cac7014744f3ded3fe9e10f6deb (patch) | |
tree | c6130a2c3288ffb88efc7d88093aea404ac08c94 /tools/build_defs/pkg | |
parent | 9cc7827da3c3e1fd14e463729bb4e9bfe320e80b (diff) |
fixed strip_prefix related with issue#1604
--
Change-Id: I49d4bcdb60052a5cf94049f962732ee2167828f1
Reviewed-on: https://bazel-review.googlesource.com/#/c/4300
MOS_MIGRATED_REVID=129615052
Diffstat (limited to 'tools/build_defs/pkg')
-rw-r--r-- | tools/build_defs/pkg/path.bzl | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/build_defs/pkg/path.bzl b/tools/build_defs/pkg/path.bzl index 135e2199b0..0b544299ee 100644 --- a/tools/build_defs/pkg/path.bzl +++ b/tools/build_defs/pkg/path.bzl @@ -48,6 +48,9 @@ def compute_data_path(out, data_path): elif data_path[0] == "/": # Absolute path return data_path[1:] else: # Relative to a sub-directory - return _short_path_dirname(out) + "/" + data_path + tmp_short_path_dirname = _short_path_dirname(out) + if tmp_short_path_dirname: + return tmp_short_path_dirname + "/" + data_path + return data_path else: return None |