Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1diff --git a/packages/flutter_tools/lib/src/build_system/targets/assets.dart b/packages/flutter_tools/lib/src/build_system/targets/assets.dart 2index 68a4cd0257..1e212b9b0d 100644 3--- a/packages/flutter_tools/lib/src/build_system/targets/assets.dart 4+++ b/packages/flutter_tools/lib/src/build_system/targets/assets.dart 5@@ -101,7 +101,11 @@ Future<Depfile> copyAssets(Environment environment, Directory outputDirectory, { 6 outputPath: file.path, 7 relativePath: entry.key, 8 )) { 9- await (content.file as File).copy(file.path); 10+ // Not using File.copy because it preserves permissions. 11+ final sourceFile = content.file as File; 12+ final destinationFile = file; 13+ 14+ await destinationFile.writeAsBytes(await sourceFile.readAsBytes(), flush: true); 15 } 16 } else { 17 await file.writeAsBytes(await entry.value.contentsAsBytes());