Skip to content

Commit

Permalink
Fix spacing and refactor code
Browse files Browse the repository at this point in the history
  • Loading branch information
judynash committed Feb 24, 2015
1 parent 1de3c0e commit e288e56
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions core/src/main/scala/org/apache/spark/util/Utils.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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")
}
}

Expand Down

0 comments on commit e288e56

Please sign in to comment.