zhongjingxiong commented on a change in pull request #35278:
URL: https://github.com/apache/spark/pull/35278#discussion_r790245648



##########
File path: core/src/main/scala/org/apache/spark/util/Utils.scala
##########
@@ -605,6 +603,22 @@ private[spark] object Utils extends Logging {
     }
   }
 
+  def unZip(inFile: File, untarDir: File): Unit = {
+    val untarCommand = new StringBuffer
+    untarCommand.append(s"mkdir $untarDir && unzip -d ")
+    untarCommand.append(FileUtil.makeSecureShellPath(untarDir))
+    untarCommand.append(" -o ")
+    untarCommand.append(FileUtil.makeSecureShellPath(inFile))
+
+    val shellCmd = Array("bash", "-c", untarCommand.toString)

Review comment:
       Yes, the unzip method provided by the previous fileutil by the window 
operating system can retain the permissions of the original file, so I can use 
the judgment statement to execute the shell command when the Linux operating 
system is found, and the window operating system retains the original method.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to