summaryrefslogtreecommitdiff
path: root/android/paths.go
diff options
context:
space:
mode:
Diffstat (limited to 'android/paths.go')
-rw-r--r--android/paths.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/android/paths.go b/android/paths.go
index 37504b62f..3f354490e 100644
--- a/android/paths.go
+++ b/android/paths.go
@@ -2208,10 +2208,15 @@ type DataPath struct {
SrcPath Path
// The install path of the data file, relative to the install root.
RelativeInstallPath string
+ // If WithoutRel is true, use SrcPath.Base() instead of SrcPath.Rel() as the filename.
+ WithoutRel bool
}
func (d *DataPath) ToRelativeInstallPath() string {
relPath := d.SrcPath.Rel()
+ if d.WithoutRel {
+ relPath = d.SrcPath.Base()
+ }
if d.RelativeInstallPath != "" {
relPath = filepath.Join(d.RelativeInstallPath, relPath)
}