Skip to content

Commit e288e56

Browse files
committed
Fix spacing and refactor code
1 parent 1de3c0e commit e288e56

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

core/src/main/scala/org/apache/spark/util/Utils.scala

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -439,13 +439,12 @@ private[spark] object Utils extends Logging {
439439
executeAndGetOutput(Seq("tar", "-xf", fileName), targetDir)
440440
}
441441
// Make the file executable - That's necessary for scripts
442-
if(isWindows){
443-
// Windows does not grant read permission by default to non-admin users
444-
// Add read permission to owner explicitly
442+
FileUtil.chmod(targetFile.getAbsolutePath, "a+x")
443+
444+
// Windows does not grant read permission by default to non-admin users
445+
// Add read permission to owner explicitly
446+
if (isWindows){
445447
FileUtil.chmod(targetFile.getAbsolutePath, "u+r")
446-
FileUtil.chmod(targetFile.getAbsolutePath, "a+x")
447-
} else {
448-
FileUtil.chmod(targetFile.getAbsolutePath, "a+x")
449448
}
450449
}
451450

0 commit comments

Comments
 (0)