From dd25e7ea36ddcffecd535684f21d0f81d80ce775 Mon Sep 17 00:00:00 2001 From: Jeff Lenk Date: Fri, 4 Jan 2013 13:53:05 -0600 Subject: [PATCH] FS-4768 part of garmts changes --- libs/win32/util.vbs | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/libs/win32/util.vbs b/libs/win32/util.vbs index 887415f437..58ca2e4e2b 100644 --- a/libs/win32/util.vbs +++ b/libs/win32/util.vbs @@ -126,9 +126,16 @@ Sub GetWgetEXE(DestFolder) End If End Sub +Function Strip(Str) + Set oRE = New Regexp + oRE.Pattern = "[\W_]" + oRE.Global = True + Strip=oRE.Replace(Str, "") +End Function + Sub UnCompress(Archive, DestFolder) - batname = "tmp" & CStr(Int(10000*Rnd)) & ".bat" - wscript.echo("Extracting: " & Archive) + batname = "tmp" & Strip(Archive) & CStr(Int(10000*Rnd)) & ".bat" + wscript.echo("Extracting: " & Archive & " - using: " & batname) Set MyFile = fso.CreateTextFile(UtilsDir & batname, True) MyFile.WriteLine("@" & quote & UtilsDir & "7za.exe" & quote & " x " & quote & Archive & quote & " -y -o" & quote & DestFolder & quote ) MyFile.Close