From e288e56a91298c55e656679ef27b313df7649836 Mon Sep 17 00:00:00 2001 From: Judy Nash Date: Tue, 24 Feb 2015 11:19:21 -0800 Subject: [PATCH] Fix spacing and refactor code --- core/src/main/scala/org/apache/spark/util/Utils.scala | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/core/src/main/scala/org/apache/spark/util/Utils.scala b/core/src/main/scala/org/apache/spark/util/Utils.scala index a3890e88b8e0a..6d91384ef2398 100644 --- a/core/src/main/scala/org/apache/spark/util/Utils.scala +++ b/core/src/main/scala/org/apache/spark/util/Utils.scala @@ -439,13 +439,12 @@ private[spark] object Utils extends Logging { executeAndGetOutput(Seq("tar", "-xf", fileName), targetDir) } // Make the file executable - That's necessary for scripts - if(isWindows){ - // Windows does not grant read permission by default to non-admin users - // Add read permission to owner explicitly + FileUtil.chmod(targetFile.getAbsolutePath, "a+x") + + // Windows does not grant read permission by default to non-admin users + // Add read permission to owner explicitly + if (isWindows){ FileUtil.chmod(targetFile.getAbsolutePath, "u+r") - FileUtil.chmod(targetFile.getAbsolutePath, "a+x") - } else { - FileUtil.chmod(targetFile.getAbsolutePath, "a+x") } }