From 61eab16c3703bc101339adf131fbdd15d8968a16 Mon Sep 17 00:00:00 2001 From: Christopher Fujino Date: Fri, 30 Aug 2019 15:03:12 -0700 Subject: [PATCH] Revert "fix recursiveCopy to preserve executable bit (#39505)" (#39588) This reverts commit 8ec2c5828d00cd9670e9a232480aa20371cf8ee7. --- dev/devicelab/lib/framework/utils.dart | 26 -------------------------- 1 file changed, 26 deletions(-) diff --git a/dev/devicelab/lib/framework/utils.dart b/dev/devicelab/lib/framework/utils.dart index e5f3d34b85..a18602891a 100644 --- a/dev/devicelab/lib/framework/utils.dart +++ b/dev/devicelab/lib/framework/utils.dart @@ -124,11 +124,6 @@ void recursiveCopy(Directory source, Directory target) { else if (entity is File) { final File dest = File(path.join(target.path, name)); dest.writeAsBytesSync(entity.readAsBytesSync()); - // Preserve executable bit - final String modes = entity.statSync().modeString(); - if (modes != null && modes.contains('x')) { - makeExecutable(dest); - } } } } @@ -139,27 +134,6 @@ FileSystemEntity move(FileSystemEntity whatToMove, .renameSync(path.join(to.path, name ?? path.basename(whatToMove.path))); } -/// Equivalent of `chmod a+x file` -void makeExecutable(File file) { - // Windows files do not have an executable bit - if (Platform.isWindows) { - return; - } - final ProcessResult result = _processManager.runSync([ - 'chmod', - 'a+x', - file.path, - ]); - - if (result.exitCode != 0) { - throw FileSystemException( - 'Error making ${file.path} executable.\n' - '${result.stderr}', - file.path, - ); - } -} - /// Equivalent of `mkdir directory`. void mkdir(Directory directory) { directory.createSync();