[flutter_tools] Don't fail copying files if the destination is not writable (#71215)

This commit is contained in:
Jia Hao
2020-11-26 07:48:03 +08:00
committed by GitHub
parent 9806865b49
commit 8de72126e9
2 changed files with 21 additions and 6 deletions

View File

@@ -289,10 +289,7 @@ class ErrorHandlingFile
// Next check if the destination file can be written. If not, bail through
// error handling.
_runSync<void>(
() {
resultFile.createSync(recursive: true);
resultFile.openSync(mode: FileMode.writeOnly).closeSync();
},
() => resultFile.createSync(recursive: true),
platform: _platform,
failureMessage: 'Flutter failed to copy $path to $newPath due to destination location error'
);