Possible fix for stat error during globbing
Globs can fail when a directory is replaced with a file: Error checking globs: stat foo: not a directory Manually check for syscall.ENOTDIR, which is not covered by fs.ErrNotExist. Ignore-AOSP-First: "Landing internal first for critical ap4a move" Bug: 369548825 Test: manual Flag: EXEMPT bugfix (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:c3cd8e3f3c93773f0051608b94a0358554a95c98) Merged-In: I35f65725b70fc0abb22aff46298d053d98d03b00 Change-Id: I35f65725b70fc0abb22aff46298d053d98d03b00
This commit is contained in:
committed by
Android Build Coastguard Worker
parent
cf886f91e4
commit
de7d7bcab2
@@ -27,6 +27,7 @@ import (
|
||||
"strings"
|
||||
"sync"
|
||||
"sync/atomic"
|
||||
"syscall"
|
||||
"time"
|
||||
|
||||
"android/soong/ui/tracer"
|
||||
@@ -780,7 +781,7 @@ func checkGlobs(ctx Context, finalOutFile string) error {
|
||||
hasNewDep := false
|
||||
for _, dep := range cachedGlob.Deps {
|
||||
info, err := os.Stat(dep)
|
||||
if errors.Is(err, fs.ErrNotExist) {
|
||||
if errors.Is(err, fs.ErrNotExist) || errors.Is(err, syscall.ENOTDIR) {
|
||||
hasNewDep = true
|
||||
break
|
||||
} else if err != nil {
|
||||
|
Reference in New Issue
Block a user