From 381cd71316fd9488fdee0567e9452e6790a3ae97 Mon Sep 17 00:00:00 2001 From: Jason Simmons Date: Wed, 11 Dec 2024 13:28:16 -0800 Subject: [PATCH] Make Felt unzip Chrome into a temporary directory next to the final location of the files (flutter/engine#57109) The Web Felt script downloads a Chrome zip archive, extracts it to a temporary directory, and then moves the files to a location expected by the script. Previously Felt used a temporary directory based on io.Directory.systemTemp. This may not work because the FileSystemEntity.rename operation used to move the files can fail if the system temp directory is located in a different filesystem from the destination directory. --- engine/src/flutter/lib/web_ui/dev/chrome_installer.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engine/src/flutter/lib/web_ui/dev/chrome_installer.dart b/engine/src/flutter/lib/web_ui/dev/chrome_installer.dart index e8dda99b8d..a044ba462f 100644 --- a/engine/src/flutter/lib/web_ui/dev/chrome_installer.dart +++ b/engine/src/flutter/lib/web_ui/dev/chrome_installer.dart @@ -218,7 +218,7 @@ class ChromeInstaller { // version directory. However, the zip file contains a top-level directory // named e.g. 'chrome-linux'. We need to copy the files out of that // directory and into the version directory. - final io.Directory tmpDir = await io.Directory.systemTemp.createTemp(); + final io.Directory tmpDir = await chromeInstallationDir.createTemp(); final io.Directory unzipDir = tmpDir; final io.ProcessResult unzipResult = await io.Process.run('unzip', [