diff options
Diffstat (limited to 'android/paths.go')
-rw-r--r-- | android/paths.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/android/paths.go b/android/paths.go index a6cda38f0..37504b62f 100644 --- a/android/paths.go +++ b/android/paths.go @@ -2210,6 +2210,14 @@ type DataPath struct { RelativeInstallPath string } +func (d *DataPath) ToRelativeInstallPath() string { + relPath := d.SrcPath.Rel() + if d.RelativeInstallPath != "" { + relPath = filepath.Join(d.RelativeInstallPath, relPath) + } + return relPath +} + // PathsIfNonNil returns a Paths containing only the non-nil input arguments. func PathsIfNonNil(paths ...Path) Paths { if len(paths) == 0 { |