
The previous attempt at this fix was assuming that the tool's file system was a `LocalFileSystem`, but in reality it's a `LocalFileSystem` wrapped in an `ErrorHandlingFileSystem`. This change takes this into account. Fixes https://github.com/flutter/flutter/issues/160082 Fixes https://github.com/flutter/flutter/issues/156962 --------- Co-authored-by: Andrew Kolos <andrewrkolos@gmail.com>