File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change 11import Compat: @static , is_windows
22
3+ if is_windows ()
4+ const exe7z = joinpath (JULIA_HOME, " 7z.exe" )
5+ end
6+
37"""
48 extract(archive, directory, [files]; [verbose=false]) -> Void
59
@@ -9,7 +13,7 @@ additional information to STDOUT.
913"""
1014function extract (archive, directory, files= AbstractString[]; verbose:: Bool = false )
1115 @static if is_windows ()
12- cmd = pipeline (` 7z x $archive -y -so` , ` 7z x -si -y -ttar -o$directory $files ` )
16+ cmd = pipeline (` $exe7z x $archive -y -so` , ` $exe7z x -si -y -ttar -o$directory $files ` )
1317 else
1418 cmd = ` tar xvf $archive --directory=$directory $files `
1519 end
@@ -28,7 +32,7 @@ Determines if the given `path` is an archive.
2832"""
2933function isarchive (path)
3034 @static if is_windows ()
31- success (` 7z t $path -y` )
35+ success (` $exe7z t $path -y` )
3236 else
3337 success (` tar tf $path ` )
3438 end
@@ -45,7 +49,7 @@ function readarchive(archive)
4549 header = " -" ^ 24
4650 content = false
4751
48- cmd = pipeline (` 7z x $archive -y -so` , ` 7z l -si -y -ttar` )
52+ cmd = pipeline (` $exe7z x $archive -y -so` , ` $exe7z l -si -y -ttar` )
4953 output = readchomp (pipeline (cmd, stderr = DevNull))
5054 for line in split (output, " \r\n " )
5155 # Extract the file name from the last column in the 7-zip output table.
You can’t perform that action at this time.
0 commit comments