Skip to content

Commit 7c8f154

Browse files
jmoraghyangah
authored andcommitted
cmd/gomobile: remove unnecessary IsDir check
The check when looking for android platform is unnecessarily stringent in that the error would be caught by the call to os.Stat, and it fails when the android platform folder is a symlink, which is the case when developing on NixOs. Change-Id: I07a96c969ffa29dea8bf8e353264e8597dcdc550 GitHub-Last-Rev: c684b80 GitHub-Pull-Request: #55 Reviewed-on: https://go-review.googlesource.com/c/mobile/+/267081 Trust: Hyang-Ah Hana Kim <hyangah@gmail.com> Trust: Heschi Kreinick <heschi@google.com> Run-TryBot: Hyang-Ah Hana Kim <hyangah@gmail.com> Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com> Reviewed-by: Rebecca Stambler <rstambler@golang.org>
1 parent 7e97214 commit 7c8f154

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cmd/gomobile/bind_androidapp.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -393,7 +393,7 @@ func androidAPIPath() (string, error) {
393393
var apiVer int
394394
for _, fi := range fis {
395395
name := fi.Name()
396-
if !fi.IsDir() || !strings.HasPrefix(name, "android-") {
396+
if !strings.HasPrefix(name, "android-") {
397397
continue
398398
}
399399
n, err := strconv.Atoi(name[len("android-"):])

0 commit comments

Comments
 (0)