twres: fix folder copy on dirty builds
Add MkdirAll before trying to copy to twres folder Change-Id: I66f150828f804fd36bbcfd2bc9ee17c54761d672
This commit is contained in:
@@ -42,6 +42,7 @@ func printCustomThemeWarning(theme string, location string) {
|
||||
func copyThemeResources(ctx android.BaseContext, dirs []string, files []string) {
|
||||
outDir := ctx.Config().Getenv("OUT")
|
||||
twRes := outDir + "/recovery/root/twres/"
|
||||
os.MkdirAll(twRes, os.ModePerm)
|
||||
recoveryDir := getRecoveryAbsDir(ctx)
|
||||
theme := determineTheme(ctx)
|
||||
for idx, dir := range dirs {
|
||||
@@ -68,6 +69,7 @@ func copyThemeResources(ctx android.BaseContext, dirs []string, files []string)
|
||||
func copyCustomTheme(ctx android.BaseContext, customTheme string) {
|
||||
outDir := ctx.Config().Getenv("OUT")
|
||||
twRes := outDir + "/recovery/root/twres/"
|
||||
os.MkdirAll(twRes, os.ModePerm)
|
||||
fileDest := twRes + path.Base(customTheme)
|
||||
fileToCopy := fmt.Sprintf("%s%s", getBuildAbsDir(ctx), customTheme)
|
||||
copyFile(fileToCopy, fileDest)
|
||||
|
||||
Reference in New Issue
Block a user