Commit 6f1d10b7 authored by KyleWong's avatar KyleWong Committed by Todd Volkert

Fix recursive link resulted `flutter doctor` stucking. See : #25885 and #25870 (#26017)

parent 14fb6435
......@@ -156,7 +156,7 @@ class AndroidStudio implements Comparable<AndroidStudio> {
try {
final Iterable<Directory> directories = fs
.directory(path)
.listSync()
.listSync(followLinks: false)
.whereType<Directory>();
for (Directory directory in directories) {
final String name = directory.basename;
......@@ -210,7 +210,7 @@ class AndroidStudio implements Comparable<AndroidStudio> {
// Read all $HOME/.AndroidStudio*/system/.home files. There may be several
// pointing to the same installation, so we grab only the latest one.
if (fs.directory(homeDirPath).existsSync()) {
for (FileSystemEntity entity in fs.directory(homeDirPath).listSync()) {
for (FileSystemEntity entity in fs.directory(homeDirPath).listSync(followLinks: false)) {
if (entity is Directory && entity.basename.startsWith('.AndroidStudio')) {
final AndroidStudio studio = AndroidStudio.fromHomeDot(entity);
if (studio != null && !_hasStudioAt(studio.directory, newerThan: studio.version)) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment